Page 1 of 1

Imagemagick causing huge server load. Pls help

Posted: 2010-10-22T16:03:45-07:00
by zerillos
I'm using imagemagick through phpthumb.

Up until a few days ago it was working fine.
i haven't changed anything in the code of my website and nothing in phpthumb. the amount of work imagemagick has to do hasn't changed since the amount of traffic is roughly the same.
over night, I started to get huge server loads, alomst crashing my server.

the website is on a dedicated server.

could a server setting cause this problem?
i'm using phpthumb just to generate thumbnails

Re: Imagemagick causing huge server load. Pls help

Posted: 2010-10-22T16:34:34-07:00
by zerillos
i forgot to mention the fact that images are very small...200 kB at max

Re: Imagemagick causing huge server load. Pls help

Posted: 2010-10-22T16:58:31-07:00
by magick
Type
  • convert -version
is OpenMP listed as a feature? If so, limit the number of threads with the MAGICK_THREADS_LIMIT or set the thread limit in the policy.xml configuration file (see http://www.imagemagick.org/script/archi ... hp#threads). Start with 1 and then try 2. You can also add --disable-openmp on the configure command line when you build / install ImageMagick. If OpenMP is not the issue, let us know.

Re: Imagemagick causing huge server load. Pls help

Posted: 2010-10-22T17:05:08-07:00
by zerillos
OpenMP is NOT listed as a feature.
the output says:
Version: ImageMAgick 6.0.7 08/25/10 q16 http://www.imagemagick.org
Copyright: Copyright (c) 1999-2004 ImageMAgick Studio LLC

Re: Imagemagick causing huge server load. Pls help

Posted: 2010-10-22T18:35:24-07:00
by fmw42
I cannot say why it suddenly is not working, but your 6.0.7 version is about 580 versions old. Perhaps it is time to upgrade to the current version at 6.6.5.2 as many many bug fixes and improvements have been made since your version.

Re: Imagemagick causing huge server load. Pls help

Posted: 2010-10-23T01:21:57-07:00
by zerillos
I suspect it could be some server settings...maybe permissions...maybe other things of this sort

do you know any server settings that might cause this issue.

i've seen it asked a few times on the web...but with no real solution

Re: Imagemagick causing huge server load. Pls help

Posted: 2010-10-23T01:24:02-07:00
by zerillos
I see that my imagemagick works on 16-bit...
my images are all 8-bit
how can i change from Q16 to Q8 without recompiling the whole thing?
(i'm not an expert in linux so pls be gentle :) )

Re: Imagemagick causing huge server load. Pls help

Posted: 2010-10-23T09:51:45-07:00
by fmw42
I don't know that you can change Q16 to Q8 without recompiling, but I am no expert on that.

But you can force your output images to 8-bits by adding -depth 8 to your commands before the output image.