Easily configure a performant, secure, and stable NGINX server.Learn More
Rails One-Click times out after a git pull containing four files. accessing my site is a 504: Gateway Timeout
Server is running and pings. I can ssh to it.
Output of sudo systemctl status unicorn:
<^>unicorn.service - “DigitalOcean Rails One-Click Application”
Loaded: loaded (/etc/systemd/system/unicorn.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2017-05-30 20:40:45 UTC; 6min ago
Main PID: 29346 (bash)
CPU: 6min 53.943s
├─ 6026 unicornrails worker -E production -c ./config/unicorn.rb
├─29346 /bin/bash /home/rails/popEFX/.unicorn.sh
└─29512 unicornrails master -E production -c ./config/unicorn.rb
May 30 20:40:45 popEFX-ruby-rails-2gb-nyc2-01 systemd: Started “DigitalOcean Rails One-Click Application”.
May 30 20:40:45 popEFX-ruby-rails-2gb-nyc2-01 DigitalOceanRailsOneClick: Using /usr/local/rvm/gems/ruby-2.4.0
Output of sudo tail /var/log/unicorn/unicorn.log is over two weeks old
<^>I, [2017-05-14T22:33:20.394874 #2329] INFO – : reaped #<Process::Status: pid 2331 exit 0> worker=0
I, [2017-05-14T22:33:20.395933 #2329] INFO – : reaped #<Process::Status: pid 2334 exit 0> worker=1
I, [2017-05-14T22:33:20.396801 #2329] INFO – : reaped #<Process::Status: pid 2337 exit 0> worker=2
I, [2017-05-14T22:33:20.397624 #2329] INFO – : reaped #<Process::Status: pid 2340 exit 0> worker=3
Exception `Errno::ECHILD’ at /home/rails/railsproject/vendor/bundle/gems/unicorn-5.3.0/lib/unicorn/httpserver.rb:399 - No child processes
I, [2017-05-14T22:33:20.397810 #2329] INFO – : master complete<^>
Output of sudo tail /var/log/nginx/error.log
<^>2017/05/30 20:30:37 [notice] 2126#2126: signal process started
2017/05/30 20:32:05 [error] 2135#2135: *46 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 188.8.131.52, server: _, request: “GET / HTTP/1.1”, upstream: “http://unix:/run/DigitalOceanOneClick/unicorn.sock/”, host: “184.108.40.206”
2017/05/30 20:42:20 [error] 2135#2135: *51 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 220.127.116.11, server: _, request: “GET / HTTP/1.1”, upstream: “http://unix:/run/DigitalOceanOneClick/unicorn.sock/”, host: “18.104.22.168”<^>
So all I know is that unicorn is not communicating with nginx. No idea why. This was working fine up until this most recent git pull.
Things I have tried that have not fixed the issue:
service unicorn restart
service nginx reload
restarting my server
gem install bundle
manually removing the Gemfile.lock file and running bundle install again
in unicorn.conf, Changing the line
manually removing the unicorn.sock file and verifying it is regenerated with a unicorn restart.
What further can I do to troubleshoot this problem? Why did this happen? How can I fix it?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×