Imagemagick causing huge server load. Pls help

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
zerillos

Imagemagick causing huge server load. Pls help

Post 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
zerillos

Re: Imagemagick causing huge server load. Pls help

Post by zerillos »

i forgot to mention the fact that images are very small...200 kB at max
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Imagemagick causing huge server load. Pls help

Post 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.
zerillos

Re: Imagemagick causing huge server load. Pls help

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Imagemagick causing huge server load. Pls help

Post 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.
zerillos

Re: Imagemagick causing huge server load. Pls help

Post 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
zerillos

Re: Imagemagick causing huge server load. Pls help

Post 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 :) )
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Imagemagick causing huge server load. Pls help

Post 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.
Post Reply