What's wrong with these huge temporary files?

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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

25GB seems a bit excessive. You could set the MAGICK_DEBUG environment variable to 'cache' to see what's going on. If you have the time, try ImageMagick 6.2.9. Consider using the Q8 version of ImageMagick rather than the default Q16 version. Make sure you are destroying an image after you are done with it so it does not persist and waste resources. Also take a look at http://www.imagemagick.org/script/architecture.php.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

We would need to reproduce the problem before we could speculate what the problem may be. If you can illustrate the problem with say 50 lines of code or less, post it here and we will try to reproduce the problem and either provide a patch or explain why large temporaries are being created.
dognose
Posts: 265
Joined: 2005-03-08T22:16:37-07:00

Post by dognose »

I'll just add that I'm having the same problem as well.

my system is on a machine with a lot of users uploading images, some of which are clearly invalid and it's been filling the disk space. Since the convert crashes or is killed when processing some extra large images, I guess the temorary files are sticking around.

.. just noticed I'm using 6.2.8.. I'll try 6.2.9 and see how it goes.

edit:
Uhg.. can't upgrade to 6.2.9
freetype2-devel is needed by ImageMagick-6.2.9-3.x86_64

Anyone know where to get or build a freetype2 rpm?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

You can set the disk cache resource limit to 1GB and this will prevent users from creating huge images. See http://magick.imagemagick.org/script/ar ... .php#cache for a discussion.
dognose
Posts: 265
Joined: 2005-03-08T22:16:37-07:00

Post by dognose »

Is there a way to set the disk cache resource limit globally?

I don't want to set it in the ENV or the command line.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Use MagickLib::SetMagickResourceLimit() to set the disk resource limit programatically.
Post Reply