unicorn-worker-killer
unicorn-worker-killer copied to clipboard
added possibility to dump object space to file before kill for memory limit
Added the parameter object_space_dump
to Unicorn::WorkerKiller::Oom. When it is set to true, before killing a process for memory reason, memory object space is dumped to file. By default the file name is /tmp/unicorn_worker_$PID.json
and can be changed in Unicorn::WorkerKiller::Configuration
class. Dump file is generated through ObjectSpace.dump_all
that is available from Ruby 2.1, so this option can be enabled only with this version of Ruby.
I think this would be really helpful for us at GitLab to diagnose Ruby leaks. Could we consider updating this branch to be mergable?
Looks like the only conflict is in the README.md. @kzk Can we consider this for a release?