Cache resources exhausted

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
dognose
Posts: 265
Joined: 2005-03-08T22:16:37-07:00

Cache resources exhausted

Post by dognose »

Just testing out the new version, and I started getting this new error message.

convert: Cache resources exhausted

Just wondering what it is and how I can avoid it. There are plenty of resources on the machine.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Cache resources exhausted

Post by magick »

Post the output of this command:

identify -list resource

ImageMagick seems to think you do not have enough disk resource.
dognose
Posts: 265
Joined: 2005-03-08T22:16:37-07:00

Re: Cache resources exhausted

Post by dognose »

Code: Select all

 identify -list resource
File       Area     Memory        Map       Disk
------------------------------------------------
 768  3.92677gb  2.94508gb  7.85355gb       16eb
does that seem right? did the units of "limit" change?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Cache resources exhausted

Post by anthony »

Seems right. Just use up memory, when you run out, then try to use a disk cache.

Other options let you limit memory usage so as to switch to disk based image caching sooner.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Cache resources exhausted

Post by magick »

Currently we're clueless how you are getting the cache resources exhausted message. It should only appear when the disk resource is consumed but you have 16 terabytes available. Check for other versions of ImageMagick on your system. Try removing them and rebuilding/reinstalling the current version. Perhaps you have a structure skew problem that is generating huge numbers in the cache statistics.
dognose
Posts: 265
Joined: 2005-03-08T22:16:37-07:00

Re: Cache resources exhausted

Post by dognose »

Sorry, I found the exact command that was causing the problem.

convert -limit memory 100 -limit disk 1 -resize 100x100! pencil.png p2.png
convert: Cache resources exhausted `pencil.png'.
convert: IDAT: CRC error `pencil.png'.
convert: Corrupt image `pencil.png'.

(it works fine with out the limits, and it works fine in previous versions)

That means it's running over 100mb of memory and 1 gig of disk?

I did just rebuild this version, so I'm hoping to get it working.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Cache resources exhausted

Post by magick »

Try this:
  • convert -limit memory 100mb -limit disk 1gb -resize 100x100! pencil.png p2.png
dognose
Posts: 265
Joined: 2005-03-08T22:16:37-07:00

Re: Cache resources exhausted

Post by dognose »

Ah, yes, that's it. so the default units on limit were changed or removed?

thanks.
dognose
Posts: 265
Joined: 2005-03-08T22:16:37-07:00

Re: Cache resources exhausted

Post by dognose »

Code: Select all

montage: invalid argument for option `400mb': -limit.
So, the -limit settings are not universal for the command line tools?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Cache resources exhausted

Post by magick »

Sounds like a bug to us. Will have a patch in ImageMagick 6.3.8-3 Beta by tomorrow.
Post Reply