Tracking down a memory leak in Ruby's EventMachine - Made of Bugs

<![endif] Made of Bugs Blog Archives Author Mar 7 th , 2013 At Stripe , we rely heavily on ruby and EventMachine to power various internal and external services. Over the last several months, we've known that one such service suffered from a gradual memory leak, that would cause its memory usage to gradually balloon from a normal ~50MB to multiple gigabytes. It was easy enough to work around the leak by adding monitoring and restarting the process whenever memory usage grew too large, but we were determined to track down the root cause. Our exploration is a tour through a number of different debugging tools and techniques, so I thought I would share it here. One powerful technique for tracking down tough memory leaks is post-mortem analysis. If our program's normal memory footprint is 50MB, and we let it leak until it's using, say, 2GB, 1950/2000 = 97.5% of the p...

Linked on 2015-04-11 00:37:25 | Similar Links