Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -


following this guide setup app on digital ocean droplet, not working. site not loading , it's throwing: "gateway time-out".

the puma server works, since ps aux | grep puma prints:

root     15878  0.0  0.4 376832  2168 ?        sl   12:50   0:00 puma 2.13.4 (unix:///var/www/myapp/shared/tmp/sockets/myapp-puma.sock) [20150930164940]         root     15881  0.0  0.7 903676  3692 ?        sl   12:50   0:06 puma: cluster worker 0: 15878 [20150930164940]                                               root     24654  0.0  0.1  11748   916 pts/2    s+   18:00   0:00 grep --color=auto puma 

my nginx config:

user root;  worker_processes 1;  events {   worker_connections 1024; }  http {     upstream puma {        server unix:///var/www/myapp/shared/tmp/sockets/myapp-puma.sock;     }      server {         listen       80;         server_name myapp.com;         root /var/www/myapp/current/public;         access_log /var/www/myapp/current/log/access.log;         error_log /var/www/myapp/current/log/error.log;          try_files $uri/index.html $uri @puma;         location @puma {             proxy_pass http://puma;             proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for;             proxy_set_header host $http_host;             proxy_redirect off;         }          client_max_body_size 10m;         keepalive_timeout 10;     } } 

i got no response server. in error.log have error:

015/09/30 17:02:39 [error] 23840#0: *1 upstream timed out (110: connection timed out) while reading response header upstream, client: 77.47.218.12, server: myapp.com, request: "get / http/1.1", upstream: "http://unix:///var/www/myapp/shared/tmp/sockets/myapp-puma.sock/", host: "myapp.com" 

while puma.error.log empty, puma.access.log contains:

message type 0x32 arrived server while idle message type 0x32 arrived server while idle message type 0x54 arrived server while idle message type 0x44 arrived server while idle message type 0x43 arrived server while idle message type 0x5a arrived server while idle message type 0x32 arrived server while idle message type 0x54 arrived server while idle message type 0x44 arrived server while idle message type 0x43 arrived server while idle message type 0x5a arrived server while idle message type 0x54 arrived server while idle message type 0x44 arrived server while idle message type 0x43 arrived server while idle message type 0x5a arrived server while idle 

from main page application starts listening server-sent events provided postgresql notify/listen + actioncontroller::live


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -