Database upload loses connection to MySQL
This article provides a solution for when the database upload loses connection to MySQL.
Description description
Environment
Adobe Commerce on cloud infrastructure - all versions
Issue/Symptoms
The database doesn’t upload to primary or integration branches on Adobe Commerce on cloud infrastructure Pro plan architecture or to any branch on the Starter plan architecture, resulting in an inability to connect. You see this error in the CLI.
web@ddc35c264bd89a72042f1f3e5a:~$ mysql -h database.internal -u user -p main
Enter password:
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0 "Internal error/check (Not system error)"
Root Cause
This issue occurs due to insufficient disk space during the database import.
Resolution resolution
Check for insufficient disk space by running the netcatcommand in the CLI against database port 3306; a “disk full” message indicates the issue.
web@ddc35c264bd89a72042f1f3e5a:~$ nc database.internal 3306
Database out of space
You’ll need to allocate more space for the database in your services.yamland deploy if you have unused space available. For steps, see Service Disk Space.
NOTE: For the Pro architecture plan, check the allocated space on your partition by running the following command: df -h.
Expect output similar to the following. In this example, 10GB of the 25GB allocated is used, with 15GB of MySQL space remaining.
f240jestone3wt@i-087r2a25fdac80726:~$ df -h|grep 'File\|xvd'
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 59G 15G 42G 26% /
/dev/xvdj 25G 10G 15G 41% /data/mysql
/dev/xvdi 25G 22G 2.6G 90% /data/exports