Convert "Memory Allocation Failed" error since upgrade to 6.8.9.9 (alongside Ubuntu upgrade)
Posted: 2017-01-27T16:53:35-07:00
I'm running a Phabricator instance at work, and one of the things it does behind the scenes is handle GIFs and such using Imagemagick. On Ubuntu 14.04, running Imagemagick 6.7.7.10, this all went smoothly. However, after upgrading to 16.04 and with it Imagemagick 6.8.9.9, images that previous were converted fine now fail. For example (this is me manually running an equivalent command to what Phabricator is trying and failing at, to make sure it wasn't just a limitation of my PHP settings):
The server VM in question is 32-bit, and previously was configured to use 2GB of RAM. I have increased this to 4GB, but this has not appeared to change the behaviour. Another Ubuntu 16.04 machine I have on hand, running a 64-bit install and with a full 16GB of RAM, does run this just fine, although on it I definitely don't notice a bump in RAM or swap usage enough to indicate this actually being a memory limitation.
I had checked with folks on the #ubuntu-server IRC channel and they couldn't puzzle it out and suggested I post on the Imagemagick forums, so here I am! I am very willing to provide any more details that might help figure this out and/or try further debugging strategies.
The image failing for me in the example above is http://www.reactiongifs.com/r/but-why.gif
Code: Select all
keithzg@serrano:/tmp$ convert 'butwhy' -coalesce +adjoin 'butwhy'_'%09d'
convert: memory allocation failed `butwhy_000000044' @ error/quantize.c/QuantizeImage/2743.
convert: memory allocation failed `butwhy_000000044' @ error/gif.c/WriteGIFImage/1648.
I had checked with folks on the #ubuntu-server IRC channel and they couldn't puzzle it out and suggested I post on the Imagemagick forums, so here I am! I am very willing to provide any more details that might help figure this out and/or try further debugging strategies.
The image failing for me in the example above is http://www.reactiongifs.com/r/but-why.gif