puma

Setting up a rails app on puma, rails, nginx everything is running, but nginx sends error

我只是一个虾纸丫 提交于 2019-12-13 02:25:20
问题 I am trying to run a rails app. I followed these instructions: http://luugiathuy.com/2014/11/setup-nginx-puma-on-ubuntu/ to set up a server. But, when I got to the end, specifically: puma -e production -d -b unix:///tmp/app_name.sock --pidfile /tmp/puma.pid Upon running it I got the response: Puma starting in single mode... * Version 2.16.0 (ruby 2.1.7-p400), codename: Midwinter Nights Trance * Min threads: 0, max threads: 16 * Environment: production * Daemonizing... The external IP just

Rails Elastic Beanstalk connection time out - puma server

荒凉一梦 提交于 2019-12-13 01:16:34
问题 I have searched over the web and stackoverflow but could not get this right. I have a rails app and deployed to elastic beanstalk. The health is ok and green but the url is not working. It waits a little while and the page says connection time out. when I type eb open gives an error; ERROR: OSError :: [Errno 10] No child processes Could not figure out why this is happening. When I eb deploy INFO: Environment update is starting. INFO: Deploying new version to instance(s). INFO: Environment

Puma silent crash with nginx reverse proxy

China☆狼群 提交于 2019-12-12 14:54:35
问题 I have a puma server running a ruby on rails app on an AWS EC2 instance. It was working fine for a while, but I found it responding with 502 errors a few hours later. The app is deployed with capistrano. A simple restart of puma fixed the problem temporarily, but I want to prevent it happening again. Not quite sure what to try first. Here's my capistrano puma config: set :puma_rackup, -> { File.join(current_path, 'config.ru') } set :puma_state, "#{shared_path}/tmp/pids/puma.state" set :puma

Where does Puma log to

独自空忆成欢 提交于 2019-12-12 10:30:55
问题 I have been using Thin to run my ruby Sinatra applications but I am now switching over to Puma. Thin creates its own log log/thin.log which I use. I noticed that Puma doesn't produce a log file (not that I can see). I have tried googling for documentation around this but not really found anything. I was wondering if/how you can specify a log path in Puma. Any help would be much appreciated. Alex 回答1: Check the example config.rb as recommended on the repo's README. As shown there: # Redirect

nginx error: (13: Permission denied) while connecting to upstream)

≡放荡痞女 提交于 2019-12-12 09:39:10
问题 I am running rails app with puma, capistrano, and nginx on a google compute engine VM with ubuntu 14.04 LTS. I have the nginx running on the external IP. And when I visit it I get two nginx errors in the log: 2016/02/03 11:58:07 [info] 19754#0: *73 client closed connection while waiting for request, client: ###.##.##.###, server: 0.0.0.0:443 2016/02/03 11:58:07 [crit] 19754#0: *74 connect() to unix:///home/my-user-name/apps/my-web-app/shared/tmp/sockets/my-web-app-puma.sock failed (13:

rails - nginx + puma - static assets not being served by nginx from the tutorial link provided

前提是你 提交于 2019-12-12 08:06:37
问题 I am using Ubuntu. Here is the tutorial Nginx config I am using: upstream my_app { server unix:///home/uname/railsproject/my_app.sock; } server { listen 88; #(I used exact 88 when I am testing now) server_name localhost; # I used exact localhost when I am testing this root /home/uname/railsproject/public; # I assume your app is located at that location location / { proxy_pass http://my_app; # match the name of upstream directive which is defined above proxy_set_header Host $host; proxy_set

Trouble connecting to rails server in AWS

前提是你 提交于 2019-12-12 06:35:38
问题 I put together a rails 5 app and am trying to run it from an AWS ec2 instance. I have set up my security groups, but can't access the special port I selected. What could be wrong? Security Group Setup: Ports Protocol Source rails-dev-and-ssh 80 tcp 72.21.xxx.0/24 ✔ 22 tcp 72.21.xxx.0/24 ✔ 3800 tcp 0.0.0.0/0 ✔ Puma server is started: [ec2-user@ip-172-31-42-206 Viewer]$ rails server -p 3800 -b 172.31.42.206 => Booting Puma => Rails 5.0.0.1 application starting in development on http://172.31.42

Websockets with Rails(Puma) - Error during WebSocket handshake: Unexpected response code: 200

岁酱吖の 提交于 2019-12-12 03:38:57
问题 I am trying to use websocket in my Rails4.1 application Here are some relevant code snippets: Gemfile: gem 'websocket-rails' gem 'puma' development.rb config.middleware.delete Rack::Lock I am starting the server locally as: bundle exec puma -p 3000 In the chrome console I see a connection error: new WebSocketRails('localhost:3000/post/hello', true); WebSocket connection to 'ws://localhost:3000/post/hello' failed: Error during WebSocket handshake: Unexpected response code: 200 Can anyone help

Puma: HTTP parse error, malformed request

安稳与你 提交于 2019-12-12 03:37:54
问题 Firing up my local server with foreman and I get the following whenever I make any request. HTTP parse error, malformed request (): #<Puma::HttpParserError: Invalid HTTP format, parsing fails.> ENV: {"rack.version"=>[1, 3], "rack.errors"=>#<IO:<STDERR>>, "rack.multithread"=>true, "rack.multiprocess"=>false, "rack.run_once"=>false, "SCRIPT_NAME"=>"", "CONTENT_TYPE"=>"text/plain", "QUERY_STRING"=>"", "SERVER_PROTOCOL"=>"HTTP/1.1", "SERVER_SOFTWARE"=>"2.9.1", "GATEWAY_INTERFACE"=>"CGI/1.2"}

Rails Puma running out of Redis connections

和自甴很熟 提交于 2019-12-12 03:01:52
问题 I've looked around at other similar questions on SO but can't quite piece things together well enough. I have a Rails app (on Heroku) that uses Puma with both multiple processes and multiple threads. My app also uses Redis as a secondary data store (in addition to a SQL database), querying Redis directly (well, through the connection_pool gem). Here's my Puma config file: workers Integer(ENV["WEB_CONCURRENCY"] || 4) threads_count = Integer(ENV["MAX_THREADS"] || 5) threads threads_count,