/tmp folder full, ImageMagick tmp files

Hi, my /tmp dir is getting full very often. I found ImageMagick creates big temp files, after deleting them everything starts to work normally.

I have checked the package manager and everything is updated

I made a cron task to erase these files every 2 hours, but still happens anyways

Any clue how to sort this out?

This is my df -h command after deleting those files:

Filesystem Size Used Avail Use% Mounted on
/dev/root 388G 230G 158G 60% /
tmpfs 16G 107M 16G 1% /dev/shm
tmpfs 6.3G 632K 6.3G 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/loop3 1.5G 177M 1.2G 14% /tmp
/dev/sda15 105M 6.1M 99M 6% /boot/efi
tmpfs 3.2G 4.0K 3.2G 1% /run/user/0

It has nothing to do with CyberPanel, that’s for sure. I’m facing the same problems. Everything is up-to-date. One thing I’d suggest is to bump your /tmp folder size. It does not take many magick “crashes” for things to fill up. Magick are using the tmp space, if the resources arn’t able to be handled in ram, if I remember correctly. But, I’ve noticed that the files are way larger than the actual files uploaded to WordPress.

-rw-------  1 username username 188M May 13 10:34 magick-iSf-JC8OKhK5wpk520TSogLZ11iiegCI
-rw-------  1 username username 338M May 13 10:33 magick-DKRdEbM7mFJCaeqa9xDo_gJyORwxgo5f

Here’s two examples.

Thanks for your reply, so it’s a RAM issue?

No, I dont think so. It’s just a execution and memory allocation in ImageMagick or similar, I think. I’m not that into ImageMagick and their logics. I can just see that ImageMagick will use the /tmp dir, if it does not have enough ram, crashes, and similar, if I remember correctly. But, I also find it odd that a 5MB image file or similar, can take up 200-400MB of space.

Hopefully someone will look into it. But, ImageMagick-development are not that active anymore. I did look for a alternative, but couldn’t really find anything good.