Closed pushcx closed 6 years ago
Yeah, just tested kill -HUP
with unicorn's pid. It reloads the views but not the app code, which I think is what led to https://github.com/lobsters/lobsters/issues/418
Like docs say: With:
HUP - reloads config file and gracefully restart all workers. [...] If "preload_app" is true, then application code changes will have no effect; USR2 + QUIT (see below) must be used to load newer code in this case. [...]
with:
- QUIT - graceful shutdown, waits for workers to finish their current request before finishing.
- USR2 - reexecute the running binary. A separate QUIT should be sent to the original process once the child is verified to be up and running.
I guess that answers the bounce.
The config file does not have preload_app
set and it defaults to false, so it's still a puzzle as to why HUP
isn't working.
I've triple-checked that the doc for unicorn symbols is current and what we're running in prod because it continues to surprise me. I just sent unicorn USR2
and it loaded new code, but the previous process exited without me needing to send it QUIT
. I think we should still send the signal, but I don't know that it's needed.
rails db:migrate
logrotate
config as well.