Imagemagick hogging CPU
|
|
Hi chaps, I’ve noticed that imagemagick is hogging a large part of the CPU when calling convert and identify, this in turn means I’m getting errors like this: Cannot allocate memory – identify -format “%wx%h” “/tmp/._imagename_01bc_030,17721,0.jpg”0 2>/dev/null /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/agnostics.rb:7:in ``’ /usr/lib/ruby/gems/1.8/gems/activesupport-2… That error is taken from delayed job. Is there any way I can stop imagemagick hogging so much cpu via paperclip or am I destined to grin and bare it? Any help is appreciated. |
|
|
Hi Jim I only have a limited amount of Imagemagick experience, those experiences have generally seen Imagemagick as fairly resource intensive. Looks like you have a fine destiny of grinning ahead of you. Let us know if you find a solution. James |
|
|
Hi Jim, this might be due to a corrupt jpg that was uploaded, or maybe a bug in imagemagick. alternatively, it might be simply that you’re running very low on ram and there isn’t quite enough for imagemagick to do its magick. stopping it hogging so much cpu is tricky. You can use rlimits (see the ulimit command in the bash manpage) but that will just result in it being killed if if uses more then x seconds of cpu. John. |