timeout when i use readImage method

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
adolfo
Posts: 5
Joined: 2011-09-30T02:21:28-07:00
Authentication code: 8675308

timeout when i use readImage method

Post by adolfo »

Hi
I have a problem with readImage when i use the 'scaleimage' method.
My process resize a lot of images, and a lot of images are resizing ok, but sometimes, i found the next error:

Image: http://foto-cache.ideal.es/jpg/7/5/1315993382957.jpg
Excepcion: exception 'ImagickException' with message 'Imagick::readimage() [<a href='imagick.readimage'>imagick.readimage</a>]: HTTP request failed! HTTP/1.0 408 Request Time-out

As you can see, the image exists, but when the program try to read the image with 'readimage' method, throw a timeout exception.

What is cause of this throw exception????

Also, when it ocurrs, apache server looks like is blocked and the number of request grow up very much and causes shutdown apache server.

The code i use is:

$imagick = new Imagick();
$imagick->setResourceLimit( Imagick::RESOURCETYPE_MEMORY, 200);
$imagick->readImage($image);
$imagick->scaleImage($newwidth, $newheight);
Post Reply