开发者

Track down memory leak in Ruby 1.9

I have a Ruby application that uses eventmachine and starts 16 processes that eac开发者_运维百科h manage 1000 connections. Initially each process only uses around 150MB, however after some runtime they consume more and more towards 500MB and I am running out of memory and swap. The amount of open connections (indicated by EM.connection_count) is normal (around 1000 all the time), so there shouldn't really be references to old connections anymore.

Unfortunately, memprof only runs under Ruby 1.8, so this is not an option in my case.

I don't want to build the ITAPPMONROBOT for my application just so I can keep it running 24/7/365. How can I find the memory leak here or how can I help the GC?


There is a known memory leak in 1.9.2's Kernel#method that affects most EM applications. See http://groups.google.com/group/eventmachine/browse_thread/thread/fa56ff02440a624d and http://redmine.ruby-lang.org/issues/show/3466#note-3

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜