How to automate the restarting of Unicorn?

Pai-Hung Chen phc at
Fri Oct 7 23:20:58 EDT 2011


I have a question about automating the restarting of Unicorn with the
following steps, and much appreciate your help.

Assumption: (i) "pid" is set to in the config file; (ii) a
Unicorn process is already running.

(1) kill -USR2 `cat` (via Capistrano deployment task for example)
(2) Inside the "before_exec" hook in the config file, do: kill -QUIT

My question is: By the time the "before_exec" hook is executed, is it
guaranteed that ahas lready created (otherwise we
have a racing condition here)? Or is there a better way to achieve
what I want?

Please Cc me as I am not on the mailing list.

Please also let me know if there is a better place to ask this question.


More information about the mongrel-unicorn mailing list