Hi,
We are trying to limit the elapsed time of ImageMagick commands, but we are failing in limiting them.
We have used the following link as reference:
http://www.imagemagick.org/script/resources.php
With reference to the above link we included the below line in policy.xml file(For limiting the time of ImageMagick command to 20 secs).
<policy domain="resource" name="time" value="20"/>
And even defined an environment variable "MAGICK_TIME_LIMIT" as 20
But ImageMagick command is not exiting even after 20 secs also.
Machine Details:
Linux 2.6.32-279.9.1.el6.x86_64 #1 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 6.3
Please let us know if we miss any configuration.
Limiting the time of any ImageMagick command
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Limiting the time of any ImageMagick command
What version of IM? A test works fine for me on v6.9.2-5 on Windows 8.1.
What commands have you tried? IM can't set a resource limit on external delegates like Ghostscript. I'm not sure about internal delegates.
What commands have you tried? IM can't set a resource limit on external delegates like Ghostscript. I'm not sure about internal delegates.
snibgo's IM pages: im.snibgo.com
Re: Limiting the time of any ImageMagick command
Thanks for the response @snibgo.
IM Version:
Version: ImageMagick 6.9.1-0 Q16 x86_64 2015-03-30 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: DPC Modules OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype jng jpeg lcms ltdl lzma pangocairo png tiff x xml zlib
Sample Commands:
Identify Command:
identify -format "Profile-icc: %[profile:icc]---Colorspace: %[colorspace]" "Upload_Test_09062016_22.pdf"
Convert Command:
convert -flatten -alpha off -units pixelsperinch "Upload_Test_09062016_26.pdf[0]" -profile "/configuration/ICCProfiles/Recommended/sRGB Color Space Profile.icm" "Upload_Test_09062016_26.pdf.jpg"
IM Version:
Version: ImageMagick 6.9.1-0 Q16 x86_64 2015-03-30 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: DPC Modules OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype jng jpeg lcms ltdl lzma pangocairo png tiff x xml zlib
Sample Commands:
Identify Command:
identify -format "Profile-icc: %[profile:icc]---Colorspace: %[colorspace]" "Upload_Test_09062016_22.pdf"
Convert Command:
convert -flatten -alpha off -units pixelsperinch "Upload_Test_09062016_26.pdf[0]" -profile "/configuration/ICCProfiles/Recommended/sRGB Color Space Profile.icm" "Upload_Test_09062016_26.pdf.jpg"
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Limiting the time of any ImageMagick command
Both your commands read PDF files. This is delegated to Ghostscript, an external program. ImageMagick doesn't set resource limits on external delegates.
snibgo's IM pages: im.snibgo.com