rbkit icon indicating copy to clipboard operation
rbkit copied to clipboard

Implement a way to write object dumps to a file

Open gnufied opened this issue 9 years ago • 3 comments

We should implement a way to write current heap dump to a file when process receives a special SIGNAL.

Such a thing can slow down the ruby process (not altogether unexpected), for first iteration we can keep it in same thread/process as main application but later on perhaps worth exploring forking a process for writing the dump file.

gnufied avatar Dec 26 '14 15:12 gnufied

Can you give me an idea of how this will be used ? Ruby already has an API for dumping all heap objects into a file, maybe we can use the same.

emilsoman avatar Dec 26 '14 20:12 emilsoman

basically, what I am thinking is - you can take a offline dump (assuming was started with profiling enabled) by sending a signal to the process. and then SCP the dump and analyze the dump for possible leaks etc.

It is useful in scenarios where client lets say does not want us to connect to the process via zeromq online but he can still create a memory dump which we can use to analyze the leak etc.

gnufied avatar Dec 26 '14 20:12 gnufied

https://samsaffron.com/archive/2015/03/31/debugging-memory-leaks-in-ruby

stereobooster avatar Sep 07 '17 19:09 stereobooster