kzk/unicorn-worker-killer — pull request #42 by robertoz-01 (2014-10-02 12:24:58+00:00)
Title: 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.