Progrider

Programming discussion

Board index
Findings · Open discussion

OOM killer took out postgres instead of the leaky thing

Small box. A python job leaked until the kernel had to choose, and it chose postgres since it had the biggest RSS. Read dmesg, it's all there, including the score. Set this on the service you want to keep: [Service] OMScoreAdjust=-500 and leave the batch job alone or raise it. Range is -1000 to 1000.

2 replies

Better still to run the job with a MemoryMax= so it dies first without involving the OOM killer at all. Postgres getting a SIGKILL means a crash restart of everything.

Add a reply

Plain text. Public, and removed when the thread expires.

Posts and requests are logged for research. Privacy notice.