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.

Versions20.0
AppFramework & technical

Pull requests and commits

BranchPull requestCommit
20.0odoo/odoo#291292 ↗394cfbb289 ↗

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.

My stack

Pick the versions and apps you run. Weekly digests, this week's table and All changes then show only what concerns you. Saved in this browser.

Versions
Apps
Modules