[Mongrel] Possible memory leak problem...

Wayne E. Seguin wayneeseguin at gmail.com
Sun Aug 19 07:15:37 EDT 2007


On Aug 19, 2007, at 02:53 , Massimo Santoli wrote:
> I'm trying to figure out a possible memory leak problem I have in my
> application.
>
> I've tested both with mongrel and webrick and the problem remains. So
> I think it's not a mongrel problem, but I'm posting here to see if
> anybody can help me.
>
> The RAILS application is quite simple, no special plugins ( no
> RMagick that has the memory problem ), it's a query and the data is
> outputted via rxml template,
> so there is the xml Builder in the template. Actually I'm doing quite
> a lot of Ruby in the template, and the output file can get VERY big
> ( depends on the input data ).
> The maximum is an output file of 35MB. When somebody does this very
> heavy search the Mongrel ( or webrick ) process reaches 400MB and the
> memory
> is never ever freed again...
> My application has 6 mongrels and if all the mongrel end up with very
> big queries I need to restart everything, having eaten up all the 2GB
> of RAM my box has.
>
> I tested for memory leaks with Scott Laird module, but I didn't find
> anything.
>
> Is it a problem of the RAILS/Ruby CG? or is there something I'm
> missing ?
>
> My only hint is the xml Builder RAILS functions, I plan to try to use
> a normal RHTML to see if something changes, I know it's not a very
> neat solution ( and BTW it is 2 to 3 times faster
> on very big XML files, from some benchmarks I've done )... but I'm
> desperate!
>
>
> Thanks
> Massimo

Massimo,

You should post this to ruby-talk mailing list. Make sure to include  
the version of ruby, the version  rails, as well as any plugins and/ 
or gems your app uses. If at all possible try to include some code  
for analysis as many people on that list will jump right on that to  
tell you what might be causing it and a better way to go about it (if  
one exists).

Best,

   ~Wayne

s///g
Wayne E. Seguin
Sr. Systems Architect & Systems Administrator

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070819/35d12bed/attachment.html 


More information about the Mongrel-users mailing list