lobsters / lobsters-ansible

Ansible playbook for lobste.rs
ISC License
79 stars 26 forks source link

Automate manual deploy steps #3

Closed pushcx closed 6 years ago

pushcx commented 6 years ago
pushcx commented 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

jstoja commented 6 years ago

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.

pushcx commented 6 years ago

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.

pushcx commented 6 years ago

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.