2

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 Answer 1

2

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

2
  • Thank you Brad. Would you mind to answer to this important point → When is it safe to delete them?
    – Romain P.
    Commented Feb 14, 2020 at 10:23
  • 1
    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
    Commented Feb 15, 2020 at 0:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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