executing code when unicorn worker is SIGKILLed

Martin Sarsale martin at malditainternet.com
Wed Sep 26 22:03:46 UTC 2012

Dear all:

I would like to execute some code when the Unicorn worker is killed
with SIGKILL (ie, incrementing a counter in graphite), what's the
"nice" way to do this?

E, [2012-09-26T17:51:47.776065 #28499] ERROR -- : worker=4 PID:28520
timeout (61s > 60s), killing
E, [2012-09-26T17:51:47.785081 #28499] ERROR -- : reaped
#<Process::Status: pid 28520 SIGKILL (signal 9)> worker=4
I, [2012-09-26T17:51:47.786659 #29010]  INFO -- : worker=4 spawned pid=29010
I, [2012-09-26T17:51:47.786994 #29010]  INFO -- : Refreshing Gem list

ps: thanks for unicorn, it feels great.

Martin Sarsale
msn: martin at malditainternet.com
jabber: martin.sarsale at gtalk.com
twitter: http://twitter.com/runixo
linkedin: http://www.linkedin.com/in/msarsale
sumavisos: http://www.sumavisos.com

More information about the mongrel-unicorn mailing list