This article provides a solution for when the /tmp
mount is full, site may be down, and you are unable to SSH into a node.
The /tmp
mount being full might result in a range of possible symptoms, including the following errors:
Steps to reproduce:
To check how full the /tmp
mount is, in the CLI switch to /tmp
and run the following command:
df -h
Expected result:
Less than 80%.
Actual result:
Around 100%.
The /tmp
mount has too many files, which could be caused by:
/tmp
directory./tmp
directory.There are things you can do to free up some space one time, and there are best practices that would prevent \tmp
from getting full.
Ensure that there are enough available inodes. To do this, run the following command:
df -i
The output would look similar to the following:
Filesystem Inodes Used Free Use% Mounted on
/dev/nvme2n1 655360 1695 653665 1% /data/mysql
Check that Use% is <70%. Inodes are correlated with files. If you remove files from the partition, you will free inodes.
There are several services that might be saving files to /tmp
.
Follow the instructions in MySQL disk space is low on Adobe Commerce on cloud infrastructure > Check and free up storage space in our support knowledge base.
Heapdumps contain logging information that might be valuable for investigating issues. Consider storing them in a separate location for at least 10 days.
Remove heapdumps (*.hprof
) using system shell:
find /tmp/*.hprof -type f -delete
If you don’t have permissions to delete files created by another user (in this case, Elasticsearch), but you see that files are large, please create a support ticket to deal with them.
Database backups are usually created for a purpose. If you are not sure if the file is still needed, consider moving it to a separate location instead of deleting it.
Check /tmp
for .sql
or .sql.gz
files and clean them up. Those might have been created by ece-tools during backup or when manually creating database dumps using the mysqldump
tool.
To avoid getting issues with /tmp
being full, follow these recommendations:
Do not use MySQL for search. Elasticsearch for search usually eliminates the need for most of the heavy temp table creations. See Configure Adobe Commerce to use Elasticsearch in our developer documentation.
Avoid running the SELECT
query on columns without indexes as this use up a large amount of temporary disk space. You can also add the indexes.
Create a cron to clean-up up /tmp
by running the following command in the CLI:
sudo find /tmp -type f -atime +10 -delete
MySQL disk space is low on Adobe Commerce on cloud infrastructure in our support knowledge base.