I have an issue using ImageMagick with php when I set the time policy.
When the time set in the policy is reached, I get an 502 Bad Gateway error (so my die('in') isn't showing )! And I can't catch it in PHP.
But php process seems still runing (while 300sec). So when sevral calls to the code are made, php finaly crash on server.
When I don't set a max time into policy.xml or when I use a small image all is working fine !
But if I use a big image, it crash.
Is there a solution to catch this 'time limit reached' into php instead of getting a connection reset by peer ?
The ningx error :
Code: Select all
[error] 28773#28773: *165 recv() failed (104: Connection reset by peer) while reading response header from upstream
Code: Select all
<?php
$img = new Imagick();
$img->readImage('samples/big_image.jpg');
die('in');
Code: Select all
<policy domain="resource" name="time" value="10"/>
Code: Select all
imagick module version 3.4.3
imagick classes Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
Imagick compiled with ImageMagick version ImageMagick 6.8.9-9 Q16 x86_64 2016-11-26 http://www.imagemagick.org
Imagick using ImageMagick library version ImageMagick 6.8.9-9 Q16 x86_64 2016-11-26 http://www.imagemagick.org
ImageMagick copyright Copyright (C) 1999-2014 ImageMagick Studio LLC
ImageMagick release date 2016-11-26
Thanks