cgmendla
By:
cgmendla

504 error in rails droplet

April 11, 2016 997 views
Ruby on Rails Nginx Ubuntu

I had originally run bundle install as root. I found some indication that deleting the Gemfile.lock contents and rerunning bundle install as rails should fix the issue. I did that and bundle exec ran.

Now I am getting a 504 gateway timeout.

nginx error log.

2016/04/10 22:31:21 [error] 965#0: *1 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 108.16.108.174, server: _, request: "GET / HTTP/1.1", upstream: "http://unix:/var/run/unicorn.sock/", host: "45.55.215.38"
2016/04/10 22:34:03 [error] 965#0: *10 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 108.16.108.174, server: _, request: "GET / HTTP/1.1", upstream: "http://unix:/var/run/unicorn.sock/", host: "45.55.215.38"
2016/04/10 22:44:27 [error] 965#0: *16 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 108.16.108.174, server: _, request: "GET / HTTP/1.1", upstream: "http://unix:/var/run/unicorn.sock/", host: "45.55.215.38"
2016/04/10 22:53:44 [error] 960#0: *1 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 108.16.108.174, server: _, request: "GET / HTTP/1.1", upstream: "http://unix:/var/run/unicorn.sock/", host: "45.55.215.38"
2016/04/10 22:59:07 [error] 960#0: *3 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 108.16.108.174, server: _, request: "GET / HTTP/1.1", upstream: "http://unix:/var/run/unicorn.sock/", host: "45.55.215.38"
2016/04/10 23:28:01 [error] 966#0: *1 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 108.16.108.174, server: _, request: "GET / HTTP/1.1", upstream: "http://unix:/var/run/unicorn.sock/", host: "45.55.215.38"
2016/04/10 23:35:43 [error] 960#0: *3 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 108.16.108.174, server: _, request: "GET / HTTP/1.1", upstream: "http://unix:/var/run/unicorn.sock/", host: "45.55.215.38"

The last ngnix access log entries

108.16.108.174 - - [10/Apr/2016:22:30:51 -0400] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0"
108.16.108.174 - - [10/Apr/2016:22:31:10 -0400] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0"
108.16.108.174 - - [10/Apr/2016:22:31:21 -0400] "GET / HTTP/1.1" 504 593 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36"
108.16.108.174 - - [10/Apr/2016:22:31:22 -0400] "GET /favicon.ico HTTP/1.1" 200 0 "http://45.55.215.38/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36"
108.16.108.174 - - [10/Apr/2016:22:34:03 -0400] "GET / HTTP/1.1" 504 593 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36"
108.16.108.174 - - [10/Apr/2016:22:34:03 -0400] "GET /favicon.ico HTTP/1.1" 200 0 "http://45.55.215.38/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36"
108.16.108.174 - - [10/Apr/2016:22:34:12 -0400] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0"
108.16.108.174 - - [10/Apr/2016:22:44:27 -0400] "GET / HTTP/1.1" 504 593 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36"
108.16.108.174 - - [10/Apr/2016:22:44:27 -0400] "GET /favicon.ico HTTP/1.1" 200 0 "http://45.55.215.38/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36"
108.16.108.174 - - [10/Apr/2016:22:53:44 -0400] "GET / HTTP/1.1" 504 593 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36"
108.16.108.174 - - [10/Apr/2016:22:53:44 -0400] "GET /favicon.ico HTTP/1.1" 200 0 "http://45.55.215.38/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36"
108.16.108.174 - - [10/Apr/2016:22:59:07 -0400] "GET / HTTP/1.1" 504 593 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36"
108.16.108.174 - - [10/Apr/2016:22:59:07 -0400] "GET /favicon.ico HTTP/1.1" 200 0 "http://45.55.215.38/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36"
108.16.108.174 - - [10/Apr/2016:23:28:01 -0400] "GET / HTTP/1.1" 504 593 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36"
108.16.108.174 - - [10/Apr/2016:23:28:02 -0400] "GET /favicon.ico HTTP/1.1" 200 0 "http://45.55.215.38/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36"
108.16.108.174 - - [10/Apr/2016:23:34:43 -0400] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36"
108.16.108.174 - - [10/Apr/2016:23:35:43 -0400] "GET / HTTP/1.1" 504 593 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36"

Here are two errors at the end of the unicorn log.

om /usr/local/rvm/gems/ruby-2.2.1/bin/unicorn:23:in `<main>'
    from /usr/local/rvm/gems/ruby-2.2.1@global/bin/ruby_executable_hooks:15:in `eval'
    from /usr/local/rvm/gems/ruby-2.2.1@global/bin/ruby_executable_hooks:15:in `<main>'
E, [2016-04-10T23:47:41.622513 #984] ERROR -- : reaped #<Process::Status: pid 3153 exit 1> worker=1
I, [2016-04-10T23:47:41.622720 #984]  INFO -- : worker=1 spawning...
I, [2016-04-10T23:47:41.629769 #3162]  INFO -- : worker=1 spawned pid=3162
E, [2016-04-10T23:47:41.638172 #984] ERROR -- : reaped #<Process::Status: pid 3150 exit 1> worker=2
I, [2016-04-10T23:47:41.638363 #984]  INFO -- : worker=2 spawning...
I, [2016-04-10T23:47:41.638981 #3162]  INFO -- : Refreshing Gem list
I, [2016-04-10T23:47:41.645706 #3165]  INFO -- : worker=2 spawned pid=3165
I, [2016-04-10T23:47:41.657105 #3165]  INFO -- : Refreshing Gem list
Be the first one to answer this question.