Restarting Unicorn with USR2 doesn't seem to reload production.rb settings

瘦欲@ 提交于 2019-12-02 20:18:24

My guess is that your unicorns are being restarted in the old production directory rather than the new production directory -- in other words, if your working directory in unicorn.rb is <capistrano_directory>/current, you need to make sure the symlink happens before you attempt to restart the unicorns.

This would explain why stopping and starting them manually works: you're doing that post-deploy, presumably, which causes them to start in the correct directory.

When in your deploy process are you restarting the unicorns? You should make sure the USR2 signal is being sent after the new release directory is symlinked as current.

If this doesn't help, please gist your unicorn.rb and deploy.rb; it'll make it a lot easier to debug this problem.

Keep in mind that: your working directory in unicorn.rb should be : /your/cap/directory/current

NOT be: File.expand_path("../..", FILE)

Because the unicorn and linux soft link forking error: soft link can not work well.

for example:

cd current #current is a soft link to another directory

... ...

when we get our working directory, we got the absolute path not the path in "current"

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