IM hangs
Re: IM hangs
That has nothing to do with ImageMagick. We call _exit(1) on a fatal error. On our system, ImageMagick exits properly as expected.
Re: IM hangs
There is no policy.xml in ImageMagick 6.2.8. I use IM 6.2.8 because 6.6.0-9 is very heavy (average server load with 6.2.8 is 1.5; average server load with 6.6.0 is 3.2).
Will policy.xml work for 6.2.8 if I create it manually?
Will policy.xml work for 6.2.8 if I create it manually?
Re: IM hangs
There is no policy.xml file for ImageMagick 6.2.8. You can set limits from the command line or use environment variables. Try ImageMagick 6.6.2 but disable OpenMP (when you configure it, add --disable-openmp to your command line). See if that reduces the average load. You can also reduce load with the Q8 version of ImageMagick instead of the default Q16 version.
Re: IM hangs
What is the difference between Q8 and Q16 versions? Will Q8 work with jpg/gif/bmp files and create animated gifs as usual?
I have Q16 6.2.8, and it produce small average load. However, Q16 6.6.0 with "--disable-openmp" option produces a high average load.
Also it seems that 6.2.8 don't understand "-limit time" option. Where can I use environment variables for 6.2.8?
I have Q16 6.2.8, and it produce small average load. However, Q16 6.6.0 with "--disable-openmp" option produces a high average load.
Also it seems that 6.2.8 don't understand "-limit time" option. Where can I use environment variables for 6.2.8?
Re: IM hangs
Q8 uses 8-bits per pixel component, Q16 uses 16-bits. If you are using a script, you can set the environment variables inside the script before you call any ImageMagick command line utility.
Re: IM hangs
Is there any difference in quality between images with 8-bits per pixel and 16-bits per pixel?Q8 uses 8-bits per pixel component, Q16 uses 16-bits.
Do you have any examples of how I can do it? I've never used this code.If you are using a script, you can set the environment variables inside the script before you call any ImageMagick command line utility.
Re: IM hangs
Of course since calculations take place in 8-bits of precision verses 16. You need to decide for yourself if the results are adversely affected by the trade-off.Is there any difference in quality between images with 8-bits per pixel and 16-bits per pixel?
It depends on your shell. For Bash you can sayDo you have any examples of how I can do it? I've never used this code.
- export MAGICK_TIME=60
Re: IM hangs
Why don't you upload some large images and see?I'm not sure it's due to large images
Re: IM hangs
I tried. Everything goes fine. I think it happens from time to time.Why don't you upload some large images and see?
Re: IM hangs
Where should I write this code? I use IM in PHP script and start "convert" using system() or exec() functions. For example, system("convert ...").It depends on your shell. For Bash you can say
export MAGICK_TIME=60
Re: IM hangs
Try PHP's putenv().
Re: IM hangs
Hi guys,
searching the internet for my problem I found this thread. I am running an IIS with PHP and Typo3. My ImageMagick version is 6.3.3. Since I installed an extension (ameos_formidable) for Typo3 (it is an CMS), I got the same problems here. The convert.exe does not exit properly sometimes, till the system hangs! I tried to solve the problem by updating ImageMagick 4.2.9 to 6.3.3 - but that doesn't fix the problem. Also it does not depend on large images.
For now I think the time limit would be a "good" solution - so I added following line to the policy.xml into the policymap-tag:
But that does not seem to work! My question is, where do I set the environment variable MAGICK_TIME_LIMIT? Is it this one?

@gregory: How did you solved the problem?
Thanks for your help!
searching the internet for my problem I found this thread. I am running an IIS with PHP and Typo3. My ImageMagick version is 6.3.3. Since I installed an extension (ameos_formidable) for Typo3 (it is an CMS), I got the same problems here. The convert.exe does not exit properly sometimes, till the system hangs! I tried to solve the problem by updating ImageMagick 4.2.9 to 6.3.3 - but that doesn't fix the problem. Also it does not depend on large images.
For now I think the time limit would be a "good" solution - so I added following line to the policy.xml into the policymap-tag:
Code: Select all
<policy domain="resource" name="time" value="60"/>

@gregory: How did you solved the problem?
Thanks for your help!
Re: IM hangs
Yes. Make a new entry in the system variables (or in user variables, if it's only for your user) with MAGICK_TIME_LIMIT. Then open a new command prompt and type "set" to check the variables.PranKe01 wrote:My question is, where do I set the environment variable MAGICK_TIME_LIMIT? Is it this one?
Re: IM hangs
Thank you - I didn't used the set command. Because I want to find the problem, I also set the MAGICK_DEBUG variable to All in the environment variables. The log.xml in the IM directory looks like this:
After some operations I looked into the IM directory, but I did not found a file called Magick-*.log
Does anyone know, if I made something wrong?
Thanks guys!
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE logmap [
<!ELEMENT logmap (log)+>
<!ELEMENT log (#PCDATA)>
<!ATTLIST log events CDATA #IMPLIED>
<!ATTLIST log output CDATA #IMPLIED>
<!ATTLIST log filename CDATA #IMPLIED>
<!ATTLIST log generations CDATA #IMPLIED>
<!ATTLIST log limit CDATA #IMPLIED>
<!ATTLIST log format CDATA #IMPLIED>
]>
<logmap>
<log events="All"/>
<log output="file"/>
<log filename="Magick-%g.log"/>
<log generations="3"/>
<log limit="2000"/>
<log format="%t %r %u %v %d %c[%p]: %m/%f/%l/%d\n %e"/>
</logmap>

Does anyone know, if I made something wrong?
Thanks guys!
Re: IM hangs
It's me again. I tried to set the time limit to 3 seconds and then used the set command. After that I used the commandshell with following command:
convert rose.jpg -resize 500% rose.png
Why I am posting that is, because the command took about 10 seconds and did not abort after 3 seconds!
In my policy.xml I got following line: <policy domain="resource" name="time" value="3"/>
Any hints, how I can cancel any convert process after 3 seconds?
convert rose.jpg -resize 500% rose.png
Why I am posting that is, because the command took about 10 seconds and did not abort after 3 seconds!
In my policy.xml I got following line: <policy domain="resource" name="time" value="3"/>
Any hints, how I can cancel any convert process after 3 seconds?