Page 1 of 1

Memory Allocation Failed

Posted: 2011-02-15T11:40:49-07:00
by suciuvlad
Mgick::ImageMagickError (memory allocation failed Mgick::ImageMagickError (memory allocation failed agick::ImageMagickError (memory allocation failedagick::ImageMagickError (memory allocation failed `/var/www/vhosts/fyves.com/rails/public/assets/pictures/6/original/6-Red_Back.jpg' @ error/quantize.c/QuantizeImage/2580):

Im receiving this error. I'm doing some image manipulations and if i repeat some steps multiple times(like zoom in/zoom out) i get this error. Anyone knows a fix for that?

Re: Memory Allocation Failed

Posted: 2011-02-15T11:52:51-07:00
by magick
You may have a memory leak. Color reduction is resource intensive but we've only seen it fail on an iPhone. We assume your 5-Red_Back.jpg is a reasonable size, perhaps less than 4000x4000 pixels?

Re: Memory Allocation Failed

Posted: 2011-02-15T13:37:28-07:00
by suciuvlad
Thanks for your reply.
Well, the size of the picture will vary, it can go beyond the reasonable size you specified. However, i reproduced the error with a small picture too(400x400).
Memory leak it's possible since im composing 2-3 images inside the script at a request.