Description
Preconditions
- Magento 2.1.3
- PHP 7.0.15 (also tried 7.0.8)
- Running in Docker container, php-fpm, nginx, redis extension
- Docker container running on AWS Elastic Beanstalk Multi-Docker Environment
- MySQL 5.7.1 RDS instance running on AWS
Steps to reproduce
- Upgraded Magento from 2.1.0 to 2.1.3 using
magento setup:upgrade
- Run
magento deploy:mode:set production
- Observe fatal error upon deployment of static content
Expected result
I expect Magento to start in deploy mode.
Actual result
Generated code and dependency injection configuration successfully.
Compilation complete
Starting deployment of static content
Something went wrong while deploying static content. See the error log for details.
Command returned non-zero exit code:
/usr/local/php/bin/php -f /data/www/bin/magento setup:static-content:deploy en_US
From system.log:
New version of deployed files: 1485709152
PHP Fatal error: Uncaught Exception: Warning: Error while sending QUERY packet. PID=259 in /data/www/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228 in /data/www/vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'Error while sen...', '/data/www/vendo...', 228, Array)
#1 /data/www/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#2 /data/www/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(95): Zend_Db_Statement_Pdo->_execute(Array)
#3 /data/www/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)
#4 /data/www/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#5 /data/www/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `session...', Array)
#6 /data/www/vendor/magento/frame in /data/www/vendor/magento/framework/App/ErrorHandler.php on line 61
PHP Stack trace:
PHP 1. {main}() /data/www/bin/magento:0
PHP 2. Symfony\Component\Console\Application->run() /data/www/bin/magento:23 [] []
What I have tried
- Increasing RAM in container to 2GB
- Doubling resources in RDS instances
- Maxing out all wait timeouts and packet size configuration options in both php-fpm and MySQL
- Converting the database to aurora
- Connections to both Redis and MySQL succeed and can be queried from inside the container, including the specific query noted in the call stack
- Disabling Redis in Magento config does not help