[Mongrel] Memory Leaks with Rails 1.2?

Jarkko Laine jarkko at jlaine.net
Thu Mar 8 02:18:13 EST 2007

On 8.3.2007, at 1.40, joost baaij wrote:

> I've got a completely reproducable case, but it has nothing to do  
> with Mongrel.
> When I use the file_column plugin [1] and resize images with  
> rmagick, every Mongrel/fcgi process grows in size until it reaches  
> it's limit (my fcgi processes are limited to 100 MB). Once there,  
> they will block/sleep/whatever and get swapped out by the OS.  
> Eventually swap is exhausted and carnage ensues.
> Without RMagick this does not happen at all, processes are 34-40 MB  
> and that's including acts_as_ferret. This behaviour has definitely  
> become more apparent since 1.2 though. And to make life more  
> interesting I've changed all parameters outside the application:  
> new mysql, new ruby, new webserver, a bunch of plugins and moving  
> towards resources-based routing. So can't help you (or myself) there.

It's a known fact that RMagick can leak like a sieve in Rails  
(explanation here [1]). You might want to try out minimagick [2] or  
imagescience [3] instead if you can.

[1] http://codehappy.wordpress.com/2007/01/17/tracking-a-memory-leak- 
[2] http://rubyforge.org/projects/mini-magick/
[3] http://seattlerb.rubyforge.org/ImageScience.html

Jarkko Laine

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2417 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20070308/36f003a7/attachment.bin 

More information about the Mongrel-users mailing list