[Mongrel] mongrel garbage collection
Steve Midgley
public at misuse.org
Mon Mar 24 11:50:17 EDT 2008
At 08:21 AM 3/24/2008, mongrel-users-request at rubyforge.org wrote:
>Message: 7
>Date: Mon, 24 Mar 2008 08:21:52 -0700
>From: "Scott Windsor" <swindsor at gmail.com>
>Subject: Re: [Mongrel] mongrel garbage collection
>To: mongrel-users at rubyforge.org
>Message-ID:
> <aa2e18ec0803240821o1f4f5921tf4156780ed0928d at mail.gmail.com>
>[snip]
>Right now, my processes aren't gigantic... I'm preparing for a 'worst
>case'
>scenario when I have a extremely large processes or memory
>usage. This can
>easily happen on specific applications such as an image server (using
>image
>magick) or parsing/creating large xml payloads (a large REST
>server). For
>those applications, I may have a large amount of memory used for each
>request, which will increase until the GC is run.
>
>[snip]
>There may be perfectly good reasons to have intermediate object
>creation
>(good encapsulation, usage of a another library/gem you can't modify,
>large
>operations that you need to keep atomic). While ideally you'd fix the
>memory usage problem, this doesn't solve all cases.
Hi Scott,
I hope this somewhat OT post is ok (feedback welcome). I've had memory
problems with image magick too - even when it runs out of process. On
certain (rare but reasonably sized) image files it seems to go memory
haywire, eating too much memory and throwing my app stack into swap.
So I wrote this simple rails plug-in which is very limited in function,
but does mostly what I needed from an image processor. Notable for your
issue above, it lets you easily specify limits on how much memory image
magick is allowed to consume while doing its work (thanks to Ara Howard
on initial direction on that one). It might be interest to you:
http://www.misuse.org/science/2008/01/30/mojomagick-ruby-image-library-for-imagemagick/
Best,
Steve
More information about the Mongrel-users
mailing list