Unicorn stuck in loop: Refreshing Gem list

佐手、 提交于 2019-12-01 07:37:18

Similar problem here. It happens when you change you Gemfile, using unicorn:reload doesn't run your new code.

Solved restarting unicorn instead of reloading it.

If you are using Capistrano, change the after deploy trigger from invoke 'unicorn:reload' to:

invoke 'unicorn:stop'
invoke 'unicorn:start'

According to https://github.com/tablexi/capistrano3-unicorn/issues/45 unicorn:restart is not working properly.

Our problem was that unicorn master process wasn't restarted correctly, because it was killed with:

/bin/kill -s HUP `cat tmp/pids/unicorn.pid`

Which doesn't actually kill the unicorn master process (only reloads the config, see SIGHUP documentation). Verify by running ps -ef | grep 'unicorn'.

Our problem was solved changing the killing of unicorn master process with:

/bin/kill `cat tmp/pids/unicorn.pid`

PS: cat tmp/pids/unicorn.pid just outputs the PID of the unicorn master process.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!