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.
Blur command in image magic make the server overloaded
-
- Posts: 11
- Joined: 2016-09-12T07:43:22-07:00
- Authentication code: 1151
Re: Blur command in image magic make the server overloaded
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.
-
- Posts: 11
- Joined: 2016-09-12T07:43:22-07:00
- Authentication code: 1151
Re: Blur command in image magic make the server overloaded
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.
-
- Posts: 11
- Joined: 2016-09-12T07:43:22-07:00
- Authentication code: 1151
Re: Blur command in image magic make the server overloaded
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
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
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Blur command in image magic make the server overloaded
What do you get from
Does it include png in the list of delegates? If so what is the version of libpng. You can find that at
Have you checked for any errors in your PHP $arr?
Code: Select all
convert -version
Code: Select all
convert -list format
-
- Posts: 11
- Joined: 2016-09-12T07:43:22-07:00
- Authentication code: 1151
Re: Blur command in image magic make the server overloaded
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
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
-
- Posts: 11
- Joined: 2016-09-12T07:43:22-07:00
- Authentication code: 1151
Re: Blur command in image magic make the server overloaded
For more details please download this image file http://www.arttoframe.com/screenshot.png
Thanks again.
Thanks again.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Blur command in image magic make the server overloaded
I'm unclear what problem you are having, but v6.7.2-7 is very old, and an upgrade may resolve it.
snibgo's IM pages: im.snibgo.com