imagemagick doesn't delete tmp files

Viewed 9718

I have an app that uses Carrierwave, S3 and rmagci. more or less following http://railscasts.com/episodes/253-carrierwave-file-uploads but just upload to S3 instead of local.

I noticed the temp files in public/uploads/ does not get deleted after an image gets created. This causes my computer to feel up over time and crash.

I looked around and the only solution i found was to write a cron job to delete them http://www.imagemagick.org/discourse-server/viewtopic.php?f=2&t=15960

any idea if there is a better way to do this in the code rather than a cronjob?

4 Answers

It means your ImageMagick installation is NOT functioning properly!

The fact that it leaves magick-* files in tmp says that ImageMagick process died and that's why it didn't delete those files. You should configure memory limits etc. Refer http://www.imagemagick.org/script/resources.php

Related