Point Unicorn to current/Gemfile instead of release dir.#39
Point Unicorn to current/Gemfile instead of release dir.#39amw wants to merge 1 commit intotablexi:masterfrom
Conversation
Without this env variable unicorn master process remembers path to Gemfile of specific release. This causes two problems when reloading unicorn using USR2 signal: 1. Gems are not refreshed if Gemfile has changed since the release when unicorn was started. 2. If the release from which unicorn was started is removed due to `keep_releases` option, unicorn will fail to reload (since that Gemfile is no longer available). You need to `cap stage unicorn:stop && cap stage unicorn:start` for this fix to be applied.
|
Out of curiosity since we've seen this issue before and have had various changes relating to it does your unicorn.rb file have the following defined as shown in the example configuration? |
|
No, it does not. I guess that's one way to fix this issue. I do think that setting the env variable when starting unicorn is safer though. That's what the old capistrano-unicorn gem did and it's the only issue I've had with the migration. |
|
When we were last working on this issue, it seemed that without this defined in the unicorn.rb the USR2 signal still had issues identifying the correct Gemfile on restart. I haven't managed to write a set of tests verifying this however. |
|
I don't have a set of tests, but it fixed my production app without adding anything about gemfile to my |
Without this env variable unicorn master process remembers path to Gemfile of specific release. This causes two problems when reloading unicorn using USR2 signal:
keep_releasesoption, unicorn will fail to reload (since that Gemfile is no longer available).You need to
cap stage unicorn:stop && cap stage unicorn:startfor this fix to be applied.