Warning: Error while sending QUERY packet. PID=2210
During a module install you have the option to backup the database. However, when selected I get an error and the backup does not complete:
Warning: Error while sending QUERY packet. PID=2210 in /var/www/magento/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228
On gitbub it was stated to increase the max_allowed_packet in mysql. I went as high as 512M and then stopped as it makes no sense. Perhaps somewhere else? This error also seems to appear during installations, but I have no issues installing Magento with my current settings.
This is an Ubuntu LAMP stack. AWS t-small [2 GB RAM].
If you can explain exactly what is going on here, maybe it can be solved. I saw suggestions of php.ini of max execution. But I don't want to guess. Please advise. Thanks!