"out of memory" when using PerlMagick

software development

#1

I recently moved all my code over from Host Gator to Dream Host. Some of the code takes an image and resizes it using PerlMagick. This worked like a charm on my Host Gator server, but I am constantly getting “out of memory” errors on my Dream Host server whenever I use an image of 500KB or larger. Smaller images do not cause this problem.

Does anyone know what may be different between the two different hosting companies’ setups that would cause this problem and if there is a fix?


#2

Sounds like you could’ve used a Dreamhost PS.


#3

I signed up for that over a month ago and still have not gotten it. As much as I like the features of DH, I might just have to switch back to Host Gator if I can’t avoid out of memory errors when resizing 500kb images.


#4

You wrote this yourself, right?

Does PerlMagick “inline” the call to PerlMagick into your perl-cgi script execution? Do you process more than one image per http request? If both of these are true, then your one script could be running for “too long” according to DreamHosts persistent process policy. OTOH, rereading your original post, it looks like you’re definitely seeing “out of memory” as the reason for the problem.

Hmm. I think DreamHost has a 100MB limit on process usage of memory for regular shared hosting users. I dunno how PerMagick could be reaching this limit. What do you see when you monitor your script from the shell using top?

Free unique IP and $67 off with code [color=#CC0000]LMIP67[/color] or use [color=#CC0000]LM97[/color] for $97 off. Click for more promo code discounts