Temporal files stay forever!

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
nahual

Temporal files stay forever!

Post by nahual »

Hi, about a week ago I upgraded from a basic hosting account to a dedicated server and started to have the following problem:
As my site is a foum, resize and other IM functions are used a lot, unfortunally, for an unknown reason, some temporal files dumped into the php temporal folder stay forever until they are manually deleted. As you can imagine once the partition is full, IM stops working as it should.

Any idea why this temporal files are never cleared from the php temporal folder?

People at hosting has recomend me to add a cron job every hour o so, to look for and delete any IM temporal files in that folder but I want to reserve this nothing at all elegant solution as a last option.

Thanks!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Temporal files stay forever!

Post by magick »

Temporary files that remain are known as a file leak. We are not aware of any file leaks in the current ImageMagick release. What version are you using? We assume you are getting files with the magick prefix. Can you narrow it down to a few lines of command line or PHP code? Is it specific to a certain image format (.e.g PDF)? It order to help we need to reproduce the problem.

Otherwise a cron job may be required. In our own web site, anyone coming to the home page causes a process to fork that checks to see if any temporary files are more than 4 hours old, if so it deletes them. We like this approach rather than cron.
Post Reply