Page 1 of 1

Blur command in image magic make the server overloaded

Posted: 2016-09-12T08:00:44-07:00
by solacedevelopers
Hello :)
we are very happy to used image magick command to blur the image on our website.
But unfortunately we faced a problem of server load on site that displayed in shell please see in screenshot http://prntscr.com/ch4z6m
We have 12 core processor on server still it get fully loaded.
Also we used the blur image command only once and also confirmed that the command is not in any loop
still it shows repeatedly in shell please see in screenshot http://prntscr.com/ch51lg ,
So we are requesting you please suggest a solution about this for us.
Thank You.

Re: Blur command in image magic make the server overloaded

Posted: 2016-09-12T08:29:34-07:00
by magick
Have you read https://www.imagemagick.org/script/security-policy.php? Try reducing the number of threads. If that is not effective you can always introduce a throttle. However, throttling may not be needed. You have multiple instances of the 'convert' command. That likely comes from your web page or script. It is unlikely that ImageMagick would repeatedly generate the same command process.

Re: Blur command in image magic make the server overloaded

Posted: 2016-09-14T07:22:23-07:00
by solacedevelopers
Thanks for your quick reply. We will check and verify the details again at our end based on your comments. We will post the exact command and other details after that.

Re: Blur command in image magic make the server overloaded

Posted: 2016-10-05T01:38:17-07:00
by solacedevelopers
The link you given https://www.imagemagick.org/script/security-policy.php? is just a way to allocate the resource, actually problem is not that.
we are executing following command
<?php
$ext="png";
$command="convert ../../userUploads/129146/blur_source_image_60587.".$ext." -channel RGBA -blur 0x33.444444444444 ../../userUploads/129146/blured_image_60587.".$ext;
exec($command, $arr, $return_var);
?>
The script is of just 3 lines and i getting the no. of threads and command on my shell >> http://prnt.sc/cpzxye
the source image is 24MB with resolution is 4317X6135

On the other hand i open the source image on paint and save as jpg
now the size of image is 4MB with resolution is 4317X6135 and run the following command
<?php
$ext="jpg";
$command="convert ../../userUploads/129146/blur_source_image_60587.".$ext." -channel RGBA -blur 0x33.444444444444 ../../userUploads/129146/blured_image_60587.".$ext;
exec($command, $arr, $return_var);
?>
It works well with no repeatation of the command on shell.
Please tell me whats is the issue

Re: Blur command in image magic make the server overloaded

Posted: 2016-10-05T08:59:22-07:00
by fmw42
What do you get from

Code: Select all

convert -version
Does it include png in the list of delegates? If so what is the version of libpng. You can find that at

Code: Select all

convert -list format
Have you checked for any errors in your PHP $arr?

Re: Blur command in image magic make the server overloaded

Posted: 2016-10-06T05:15:10-07:00
by solacedevelopers
Hello,
Thanks for your last reply. As per your last comment, I tried both of the above command and
it shows the following output >> http://prntscr.com/cqfwub

Re: Blur command in image magic make the server overloaded

Posted: 2016-10-06T05:25:26-07:00
by solacedevelopers
For more details please download this image file http://www.arttoframe.com/screenshot.png
Thanks again.

Re: Blur command in image magic make the server overloaded

Posted: 2016-10-06T08:00:20-07:00
by snibgo
I'm unclear what problem you are having, but v6.7.2-7 is very old, and an upgrade may resolve it.