Jon Molin wrote:
> 
> Hi list,
> 
> I've done a scripts that builds an calender and colours the days with
> different colours depending on the status of the day. I've got 6 colours
> and one to just fill out so the month starts with the correct day, ie
> i've got 6 * 31 + 1 = 187 images and each is about 70 bytes so a
> calender is 6 times 7 of these little sqaures, about 3k.
> 
> Now this little script handling this tiny amount of data runs amok and
> grows and grows untill i restart apache brutaly, I guess I've done
> something very wrong but I can't figure out what, nor can I find any
> info about this. Here's what the program looks like:
> 

Generally, I am not surprised when finding memory leaks in XYZ
module.  The code in the email looked fine, so I would suspect
Image::Magick having the leak.  To prove this better, you might
take the code out of the mod_perl request, and run it through a 
test of 1000 iterations in a command line script, and report the 
problem to the author of Image::Magick.

So, without waiting for a Image::Magick fix, you can make
memory leaks less painful by setting MaxRequestPerChild lower, say
to 100 or by using a solution like Apache::SizeLimit to kill a child 
process when it uses too much RAM ( unshared RAM on Linux too )

--Josh

_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks Founder                       Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

Reply via email to