3

I get the following error when I use static-content:deploy -vvv. How can I remedy this?

If it is an issue with SQL max_allowed_packet, I am on a shared server so cannot change this myself, but may be able to get my host to change this if I have a good reason.

[Exception] Warning: Error while sending QUERY packet. PID=368675 in /public_html/mag2/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228

Exception trace:
 () at  /public_html/mag2/vendor/magento/framework/App/ErrorHandler.php:61
 Magento\Framework\App\ErrorHandler->handler() at n/a:n/a
 PDOStatement->execute() at  /public_html/mag2/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228
 Zend_Db_Statement_Pdo->_execute() at  /public_html/mag2/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:95
 Magento\Framework\DB\Statement\Pdo\Mysql->_execute() at  /public_html/mag2/vendor/magento/zendframework1/library/Zend/Db/Statement.php:303
 Zend_Db_Statement->execute() at  /public_html/mag2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php:480
 Zend_Db_Adapter_Abstract->query() at  /public_html/mag2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:238
 Zend_Db_Adapter_Pdo_Abstract->query() at  /public_html/mag2/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:452
 Magento\Framework\DB\Adapter\Pdo\Mysql->_query() at  /public_html/mag2/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:507
 Magento\Framework\DB\Adapter\Pdo\Mysql->query() at  /public_html/mag2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php:737
 Zend_Db_Adapter_Abstract->fetchAll() at  /public_html/mag2/vendor/magento/framework/Data/Collection/Db/FetchStrategy/Query.php:21
 Magento\Framework\Data\Collection\Db\FetchStrategy\Query->fetchAll() at  /public_html/mag2/vendor/magento/framework/Data/Collection/AbstractDb.php:772
 Magento\Framework\Data\Collection\AbstractDb->_fetchAll() at  /public_html/mag2/vendor/magento/framework/Data/Collection/AbstractDb.php:668
 Magento\Framework\Data\Collection\AbstractDb->getData() at  /public_html/mag2/vendor/magento/framework/Data/Collection/AbstractDb.php:572
 Magento\Framework\Data\Collection\AbstractDb->loadWithFilter() at  /public_html/mag2/vendor/magento/framework/Data/Collection/AbstractDb.php:557
 Magento\Framework\Data\Collection\AbstractDb->load() at  /public_html/mag2/vendor/magento/framework/Data/Collection.php:300
 Magento\Framework\Data\Collection->getFirstItem() at  /public_html/mag2/vendor/magento/module-theme/Model/ResourceModel/Theme/Collection.php:141
 Magento\Theme\Model\ResourceModel\Theme\Collection->getThemeByFullPath() at  /public_html/mag2/vendor/magento/module-theme/Model/Theme/ThemeProvider.php:53
 Magento\Theme\Model\Theme\ThemeProvider->getThemeByFullPath() at  /public_html/mag2/vendor/magento/framework/View/Design/Theme/FlyweightFactory.php:115
 Magento\Framework\View\Design\Theme\FlyweightFactory->_loadByPath() at  /public_html/mag2/vendor/magento/framework/View/Design/Theme/FlyweightFactory.php:62
 Magento\Framework\View\Design\Theme\FlyweightFactory->create() at  /public_html/mag2/vendor/magento/module-theme/Model/View/Design.php:148
 Magento\Theme\Model\View\Design->setDesignTheme() at  /public_html/mag2/vendor/magento/module-deploy/Model/Deployer.php:139
 Magento\Deploy\Model\Deployer->deploy() at  /public_html/mag2/vendor/magento/module-deploy/Console/Command/DeployStaticContentCommand.php:121
 Magento\Deploy\Console\Command\DeployStaticContentCommand->execute() at  /public_html/mag2/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
 Symfony\Component\Console\Command\Command->run() at  /public_html/mag2/vendor/symfony/console/Symfony/Component/Console/Application.php:874
 Symfony\Component\Console\Application->doRunCommand() at  /public_html/mag2/vendor/symfony/console/Symfony/Component/Console/Application.php:195
 Symfony\Component\Console\Application->doRun() at  /public_html/mag2/vendor/magento/framework/Console/Cli.php:96
 Magento\Framework\Console\Cli->doRun() at  /public_html/mag2/vendor/symfony/console/Symfony/Component/Console/Application.php:126
 Symfony\Component\Console\Application->run() at  /public_html/mag2/bin/magento:23
2

please ask your host to change "max_allowed_packet=100m" and if you have more then 100 then try to increase it. please increase your max_allowed_packet. It will help to solve your issue.

1

Official Magento DevDocs are recommending 16MB for this value

Although (due to large data sets and data processing operations) at one of Projects @ Production I have this setting at 512MB

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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