You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
We recently ran into a major production issue with our nginx+unicorn setup after upgrading from bundler08. After some time our unicorn processes would become completely unresponsive to USR2 signals and would need to be forcibly restarted.
Lowdown: unicorn does not clear it's PATH/RUBYOPT environment variables on re-exec, and thus unicorn+bundler+capistrano accrues gems from every deployed version (!!) until a long-lived unicorn becomes sad & tired and must be sent to the glue factory.
Forcibly clearing the environment in one's unicorn configuration solves the issue:
stash_env = %w(PATH RUBYOPT).map { |x| [ x, ENV[x] ] }
before_exec do |_|
stash_env.each { |(k,v)| ENV[k] = v }
end
...but per the above thread Eric is opting not to patch this in unicorn itself, since it can be desirable to maintain the environment between re-execs. So it would be good to address this in bundler, either with code or documentation.
The text was updated successfully, but these errors were encountered:
We recently ran into a major production issue with our nginx+unicorn setup after upgrading from bundler08. After some time our unicorn processes would become completely unresponsive to USR2 signals and would need to be forcibly restarted.
We tracked it down to an issue recently discussed on the Unicorn list:
http://www.mail-archive.com/mongrel-unicorn@rubyforge.org/msg00273.html
Lowdown: unicorn does not clear it's PATH/RUBYOPT environment variables on re-exec, and thus unicorn+bundler+capistrano accrues gems from every deployed version (!!) until a long-lived unicorn becomes sad & tired and must be sent to the glue factory.
Forcibly clearing the environment in one's unicorn configuration solves the issue:
...but per the above thread Eric is opting not to patch this in unicorn itself, since it can be desirable to maintain the environment between re-execs. So it would be good to address this in bundler, either with code or documentation.
The text was updated successfully, but these errors were encountered: