I was upgrading Magento 2.1.6 to Magento 2.2.4. Everything went ok but the final step is to run bin/magento setup: upgrade and when I run that I get the below error.

enter image description here

ERROR :  Warning: Error while sending QUERY packet. PID=40252 in /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228

Any suggestions, please?


1 Answer 1


You need to increase the wait_timeout and max_allowed_packet value from your database configuration...

increase wait_timeout = XX to wait_timeout=180

Also, Change at least max_allowed_packet = 512M or 1024M

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.