Insufficient memory (case 4) @ error/jpeg.c/JPEGErrorHandler/297

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
davidb2002
Posts: 37
Joined: 2008-09-01T08:31:26-07:00

Insufficient memory (case 4) @ error/jpeg.c/JPEGErrorHandler/297

Post by davidb2002 » 2016-03-07T08:51:46-07:00

My server was recently updated to ImageMagick 6.7.2-7 2015-07-23 Q16. After this, I have noticed a few large files have trouble running some resizing commands which worked fine previously. Upon catching the errors, I get this:

Code: Select all

Insufficient memory (case 4) /my/image/file/big-photo.jpg @ error/jpeg.c/JPEGErrorHandler/297
I take it this implies Imagick doesn't have sufficient memory to run the commands? here is my resource list:

Code: Select all

File         Area       Memory          Map         Disk    Thread         Time
-------------------------------------------------------------------------------
 768     21.123GB    78.687GiB    157.37GiB    unlimited        24    unlimited
As you can see, i've got loads of memory. So, where is the memory bottlneck likely to be?

User avatar
fmw42
Posts: 25756
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Insufficient memory (case 4) @ error/jpeg.c/JPEGErrorHandler/297

Post by fmw42 » 2016-03-07T10:03:19-07:00

Might your /tmp directory be too full?

Might your server have some limit on file size in its Environment variables?

User avatar
magick
Site Admin
Posts: 11096
Joined: 2003-05-31T11:32:55-07:00

Re: Insufficient memory (case 4) @ error/jpeg.c/JPEGErrorHandler/297

Post by magick » 2016-03-07T17:08:31-07:00

The "Insufficient memory (case 4)" exception is returned by the JPEG delegate library, not ImageMagick.

Post Reply