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
Issue
You receive an " SQL server has gone away " error message in the cron.log
file.
Steps to reproduce
Import files and trigger a deployment.
Expected result
Successful deployment.
Actual result
Error message in cron.log
:" SQLSTATE[HY000] [2006] MySQL server has gone away at/app/AAAAAAAAA/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:144"
Cause
The 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.
Solution