[PATCH] `kill -SIGTRAP <worker pid>`
cedric at maion.com
Sun Jun 24 11:05:53 UTC 2012
-----BEGIN PGP SIGNED MESSAGE-----
> Please keep Subject lines a reasonable length (git recommends the commit
> message subject wrap at ~50 columns or so) and wrap code at <= 80
> SIGKILL timeout is only a last line of defense when the Ruby VM itself
> is completely broken. Handling SIGTRAP implies the worker can still
> respond (and /can/ be rescued), so your SIGTRAP handler is worthless if
> SIGKILL is required to kill a process.
Sure. But if the VM is responding, being able to get a backtrace is nice.
And if it's stuck, you won't get anything indeed, but that's still an
information (in that case, one may eventually want to get a gdb
backtrace too). No?
> See http://unicorn.bogomips.org/Application_Timeouts.html
Yes, I'm well aware of this. However, when you still get rare unicorn
timeouts, debugging them is not obvious.
In my case, a server in a loadbalanced farm sometimes sees all it's
unicorn workers timeout in the same minute (approx once a day at what
seems a random time) -- other servers are fine. Couldn't correlate this
with any specific network/disk/misc system/user activity yet.
> Sleeping here is also unacceptable since it blocks the main loop,
> making masters signal handlers non-responsive for too long.
> Using the Logger class inside a signal handler can deadlock. Logger
> attempts to acquire a non-reentrant lock when called. Unicorn doesn't
> use threads itself, but the Rack app may use threads internally.
ok, can be replaced with a $stdout.write then.
> Thanks for your interest in unicorn!
Thanks for your feedback,
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
More information about the mongrel-unicorn