NewHighlight of Weekly #002
Stack dump when a worker is killed on timeout
Before killing a worker that hit its time limit, the server now sends it SIGQUIT. The log then shows the request path and the exact line being processed, which is usually the cause of a stuck request or cron job.
Pull requests and commits
Commit message
[IMP] server: dump the stack when killing a worker
When a worker timeouts, the server main process will kill it. Since the
request is not finished, we don't have any information in the log about
what was being processed by this worker.
The proposed solution will first kill -3 the worker in order to get dump
the stack, having the side effect of giving the request path, but also
the specific line it was processing at this time, most likely the cause
of the slow/stuck request/cron.
A little verbosy, but should only accur if a worker reaches the timeout
of a request.