1

For several websites (Craft CMS 2 & 3), servers ran out ot storage even if these websites were not storing a lot of assets.

After looking for why, I ended up in the temporary (tmp/) folder of these servers (which is at a lower level of these vhosts), where I found there were a lot of Craft-related filed that were not purged.

These are, for example:

  • Imagick files (some of them have a size of ~500 Mb!)
  • A lot of Twig PHP folders and files (which content looks very similar as found in /storage/runtime/)

Questions:

  • When and why these files are generated?
  • Why they are not automatilcally deleted?
  • When is it safe to delete them?

To be more specific:

  • Because I'm using Imgix, front-end image transforms are delegated to this remote service;
  • In this case, I think that only the CP uses Imagick;
1

Imagick uses the /tmp folder by default, but you can change it: https://github.com/ImageMagick/ImageMagick/issues/399#issuecomment-285793433

  • Thank you Brad. Would you mind to answer to this important point → When is it safe to delete them? – Romain Poirier Feb 14 at 10:23
  • Generally speaking, I'd say if it's in the tmp folder, I'd guess it'd be safe to delete. If a tmp file was currently in use, you'd get an error message saying so. – Brad Bell Feb 15 at 0:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.