This article talks about the solution for the issue where you receive an " SQL server has gone away " error message in the
cron.log file. A range of symptoms including image file importing issues or deployment failure may be experienced.
Affected products and versions
- Adobe Commerce on cloud infrastructure, all supported versions.
You receive an " SQL server has gone away " error message in the
Steps to reproduce
Import files and trigger a deployment.
Error message in
cron.log :" SQLSTATE[HY000]  MySQL server has gone away at/app/AAAAAAAAA/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:144"
default_socket_timeout value is set too low. This is caused by the setting
default_socket_timeout . If php doesn't receive anything from the MySQL database within this period, it assumes it is disconnected and throws the error.
- Check the current timeout period for
default_socket_timeoutby running in the CLI:
clike php -i |grep default_socket_timeout
- Depending on the timeout setting increase, the
default_socket_timeoutvariable to the expected longest possible run time in the
/etc/platform/<project_name>/php.inifile. It is suggested that you set between 10-15 mins.
- Commit it to GIT and redeploy.