This article provides solutions for when you are experiencing very low space or no space for MySQL on Adobe Commerce on cloud infrastructure. Symptoms could include site outages, customers unable to add products to the cart, being unable to connect to the database, access the database remotely, not being able to SSH into node. Symptoms also include Galera, environment sync, PHP, database, and deployment errors as listed below. Click Solution to jump directly to the solution section.
Adobe Commerce on cloud infrastructure 2.3.0-2.3.6-p1, 2.4.0-2.4.2
The database gets too big. The symptoms might include losing the database connection, database upload error, and a variety of other issues.
Errors you may encounter:
Environment sync errors:
<table\_name>is full’ on query.
<environment name>, ‘bash’, ‘-c’, ‘/etc/platform/
<environment name>/post_deploy.sh’]’ returned non-zero exit status 255
<node IP address>, ‘sudo /usr/bin/sv -w 30 restart site-
<environment name>g-nginx’]’ returned non-zero
<filename>(Errcode: 28 “No space left on device”) Indexing errors (along with orphaned temporary .ibd files in /tmp):
Steps to reproduce:
One of the ways you can check if the
/data/mysql (or wherever MySQL data storage is configured) is full is by running the following command in the CLI:
Less than 10% of free memory on MySQL disk is a primary indicator of an outage.
/data/mysql mount might become full due to a range of issues, such as not having enough inodes, available storage space, and bad queries that generate temporary tables.
There is an immediate step that you might take to bring MySQL back on track (or prevent it from getting stuck): free up some space by flushing big tables.
Following are details on both quick and long-term solutions.
Ensure that there are enough available inodes. To do this, run the following command:
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 available storage space. For this, execute:
The output would be similar to following:
Size Used Avail Use% Mounted on· 50G 49G 95M 100% /data/mysql
If the Use % is >70%, you need to take action to free/add some space.
Check for large
ibtmp1 file on
/data/mysql of each node: this file is the tablespace for temporary tables. If there are bad queries that generate temp tables, they are contained in the
ibtmp1 file. This file is only removed when the database is restarted. If it is taking up all available space, the database must be restarted. If there are bad queries, it will be recreated again.
We strongly recommend creating a database backup before performing any manipulations and avoiding them during high site load periods. See Dump your database in our developer documentation.
Check if there are large tables and consider if any of them can be flushed. Do this on the primary (source) node.
For example, tables with reports can usually be flushed. For details on how to find large tables, see the Find Large MySQL tables article.
If there are no huge report tables, consider flushing
_index tables, just to return the Adobe Commerce application back on track.
index_price tables would be the best candidates. For example,
catalog_category_product_index_storeX tables, where X can have values from “1” to the maximum store count. Please mind that you would need to reindex to restore data in these tables, and in the case of big catalogs, this reindex might take a lot of time.
Once you flush them, wait for wsrep sync completion. You can now create backups and take more significant steps to add more space, like allocating/buying more space and enabling Order/Invoice/Shipment archive functionality.
Check your MySQL server binary logging settings:
log_bin_index. If the settings are enabled, the log files might become huge. Create a support ticket requesting to purge large binary log files. Also, request to check that binary logging is being configured correctly so that logs are purged periodically and don’t take too much space.
If you don’t have access to MySQL server settings, request support to check it.
Allocate more disk space for MySQL if you have some unused. See the Check disk space limit article to learn how to check if you have free disk space.
If you have reached your space limit and still experience low space issues, consider buying more disk space, contact your Adobe Account Team for details.