Hi, magick:
I used imageMagick to build a web server which allowd users to upload images. But recently, I found a problem that seems ImageMagick
does not remove the temporary file as soon as it is no longer needed. Assume that the pid of web server is 3333, when I use the cmd "ls -l /proc/3333/fd",
I see lots of tmp file handler which are not released. such as bellow:
lrwx------ 1 root root 64 Nov 5 10:53 100 -> /data/tmp/magick-XXXFVw0Z (deleted)
if I shutdown the webserver, these handler will be released.
In addition, at the first day of web server lanched, this will not happen, the generated tmp file will be deleted as soon as possible. But after few days, this phenomena will happen
My question is: Dose anyone know how this happen? Dose ImageMagick use a lazy cleanup policy, so it will not cleanup the tmp files until the process exit? My application should work for long of times without restart, so is there any method or APIs let imageMagick clean the tmp file as soon as possilble?
Thanks very much!
about generated temp files
Re: about generated temp files
We have no known file leaks in ImageMagick. Symbolic links are a security measure we use to launch delegate programs such as gs. To investigate further we need to know which delegate is leaving the temporary files behind. Once you identify the delegate program (see delegate.xml) that causes the leak and the circumstances, post here and we will investigate further. We need to reproduce the problem before we can fix it.