Thumbnail creation failure: cache resources exhausted

davidarnoult Member
edited April 26 in General support

Hi,

When I use imagemagick, for some large images, I have this error.

I have modified my php settings for large images:
php_value memory_limit 1G
php_value upload_max_filesize 1G
php_value post_max_size 1G
php_value max_execution_time 600
php_value max_input_time 1000
php_value max_file_uploads 20

When I swith to GD, it works. I thought that Imagemagick was more adequate to process large images ;-)

Debug message

Album: [ 1950-1959/1950 ], Image: [ 1950-0001-0001.JPG ]

Image filesize: 12550409

Debug i.php | Arguments:
size =
width = 180
height =
cw = 0
ch = 0
cx =
cy =
quality = 85
thumb =
crop =
Zenphoto Image Processing Error: cacheImage(/1950-1959/1950/1950-0001-0001_w180.jpg) exception: cache resources exhausted `/server_path/albums/1950-1959/1950/1950-0001-0001.JPG' @ error/cache.c/OpenPixelCache/4083

Request URI: [ /zp-core/i.php?a=1950-1959/1950&i=1950-0001-0001.JPG&w=180&cw=0&ch=0&q=85&wmk=!&check=64197171ba4daca336bdf93a25d30dd15f236f38&debug ]
PHP_SELF: [ /zp-core/i.php ]
Cache: [/cache//1950-1959/1950/1950-0001-0001_w180.jpg]
Image: [1950-1959/1950//server_path/albums/1950-1959/1950/1950-0001-0001.JPG]

cacheImage(/1950-1959/1950/1950-0001-0001_w180.jpg) exception: cache resources exhausted `/server_path/albums/1950-1959/1950/1950-0001-0001.JPG' @ error/cache.c/OpenPixelCache/4083

Any idea where I missed something about OpenPixelCache/4083?

Thanks

Comments

  • davidarnoult Member
    edited April 26

    For information, updating /etc/ImageMagick-6/policy.xml did the trick (Debian 10)... especially these settings:

     <policy domain="resource" name="memory" value="2GiB"/>
     <policy domain="resource" name="map" value="4GiB"/>
     <policy domain="resource" name="width" value="128KP"/>
     <policy domain="resource" name="height" value="128KP"/>
    

    I just share this as you might encounter the same problem with large files!

  • acrylian Administrator, Developer

    When I swith to GD, it works. I thought that Imagemagick was more adequate to process large images ;-)

    Interestingly not always. I remember similar reports that GD works better sometimes.

    We can add the above to our user guide entry but most users will not be able to update those configs unless they have their own virtual/dedicated server (e.g. we on our own server).

Sign In or Register to comment.