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