cache resources exhausted Imagemagick

Gregory Frerot picture Gregory Frerot · Jul 14, 2015 · Viewed 13.8k times · Source

I'm using Imagemagick on a rails app with Minimagick and i generate some pictogram with it.

When i launch my process i have this error and i don"t find solution

MiniMagick::Error (`convert -limit memory 2GiB -limit map 2GiB -limit   disk 4GiB -background none -fill #000000 -font ttf/SELIS006N.ttf -pointsize 300 label: S public/pictogram_images/RECINTAN-EL-064-layer-1.png` failed with error:
convert.im6: cache resources exhausted ` S' @ error/cache.c/OpenPixelCache/4078.
convert.im6: no images defined `public/pictogram_images/RECINTAN-EL-064-layer-1.png' @ error/convert.c/ConvertImageCommand/3044.
):

My process is simple, i have some .tff file and each character is a pictogram. I just want to generate all preview of this character in png

Answer

LF00 picture LF00 · Dec 10, 2018

Find the policy.xml with find / -name "policy.xml"

something like /etc/ImageMagick-6/policy.xml

and change <policy domain="resource" name="disk" value="1GiB"/> to <policy domain="resource" name="disk" value="8GiB"/>

refer to convert fails due to resource limits

Memory issues