Time limit variable
Posted: 2014-10-01T02:06:48-07:00
Hello.
In the policy.xml file one can set the <policy domain="resource" name="time" value="3600"/>. Accoring to documentation(http://www.imagemagick.org/script/resources.php) this variable holds the number of seconds each IM process can take before it`s aborted. In our production system this was changed from nothing(i.e commented out) to "120" which resulted in numerous aborted jobs. We use a python wrapper for IM called Wand(http://docs.wand-py.org/en/latest/) I suspect the variable is actually interpreted as milliseconds and not seconds, as when we commented out the policy the problem disappeared. Can you confirm the variable is interpreted as seconds and not milliseonds. If so this might be a bug in the wrapper..
Regards Erik
[edit]
The problem was that IM aborted it`s constrctor
"python: time limit exceeded `' @ fatal/cache.c/GetImagePixelCache/2098."
It aborted after stalling for less then a second. I don`t have the exact time for the IM constrctor. But with fetching files over http and parsing some json most images where processed at around 0.4 seconds. This makes it quite plausible too belive that many files passed as long as they where processed in under 120 ms, but where aborted if they took longer. Most of these images where light, mostly JPEGs and PNGs.
[/edit]
In the policy.xml file one can set the <policy domain="resource" name="time" value="3600"/>. Accoring to documentation(http://www.imagemagick.org/script/resources.php) this variable holds the number of seconds each IM process can take before it`s aborted. In our production system this was changed from nothing(i.e commented out) to "120" which resulted in numerous aborted jobs. We use a python wrapper for IM called Wand(http://docs.wand-py.org/en/latest/) I suspect the variable is actually interpreted as milliseconds and not seconds, as when we commented out the policy the problem disappeared. Can you confirm the variable is interpreted as seconds and not milliseonds. If so this might be a bug in the wrapper..
Regards Erik
[edit]
The problem was that IM aborted it`s constrctor
"python: time limit exceeded `' @ fatal/cache.c/GetImagePixelCache/2098."
It aborted after stalling for less then a second. I don`t have the exact time for the IM constrctor. But with fetching files over http and parsing some json most images where processed at around 0.4 seconds. This makes it quite plausible too belive that many files passed as long as they where processed in under 120 ms, but where aborted if they took longer. Most of these images where light, mostly JPEGs and PNGs.
[/edit]