Cause

The /tmp mount has too many files, which could be caused by:

  • Bad SQL queries generating large and/or too many temp tables.
  • Services writing to the /tmp directory.
  • Database backups/dumps left in the /tmp directory.

Solution

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.

Check and free up inodes

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.

Check and free up storage space

There are several services that might be saving files to /tmp.

Check up and free MySQL space

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.

Check up Elasticsearch heapdumps

WARNING
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.

Check up database dumps/backups

WARNING
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.

Best practices

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.

Previous pagerobots.txt not updated or displaying default settings
Next pageUnknown module Magento_BundleSampleData

Commerce


How AI Is Transforming the Commerce Landscape

Online | Session | General Audience

Delve into how AI is revolutionizing the commerce landscape by optimizing operations, enhancing customer experiences, and improving...

Tue, Mar 18, 3:30 PM PDT (10:30 PM UTC)

Register

Put the Customer at the Center and Build Relationships That Last a Lifetime

Online | Strategy Keynote | General Audience

First impressions last a lifetime. Great first impressions feel personal, connected, and relevant right from the start. From the first...

Wed, Mar 19, 2:30 PM PDT (9:30 PM UTC)

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more