cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.1.7 - Datenbankfehler bei set:deploy:mode production

Magento 2.1.7 - Datenbankfehler bei set:deploy:mode production

Hallo Leute,

 

ich beiße mir gerade an einem Problem die Zähne aus.

In der Regel ganz simpel, ich möchte den Shop einfach in den Production Mode versetzen.

Das sieht am Anfang auch noch alles klasse aus, aber beim static content deploy fliegt er auf die Nase.

magento2 > bin/magento deploy:mode:set production
Enabled maintenance mode
Starting compilation
Compilation was started.
%message% 0/7 [>---------------------------] 0% 1 sec 44.0 MiB%message% 0/7 [>---------------------------] 0% 1 sec 44.0 MiBProxies code generation... 0/7 [>---------------------------] 0% 1 sec 44.0 MiB
Proxies code generation... 1/7 [====>-----------------------] 14% 1 sec 46.0 MiB
Repositories code generation... 1/7 [====>-----------------------] 14% 1 sec 46.0 MiB
Repositories code generation... 2/7 [========>-------------------] 28% 8 secs 116.0 MiB
Service data attributes generation... 2/7 [========>-------------------] 28% 8 secs 116.0 MiB
Service data attributes generation... 3/7 [============>---------------] 42% 8 secs 116.0 MiB
Application code generator... 3/7 [============>---------------] 42% 8 secs 116.0 MiB
Application code generator... 4/7 [================>-----------] 57% 23 secs 128.0 MiB
Interceptors generation... 4/7 [================>-----------] 57% 23 secs 128.0 MiB
Interceptors generation... 5/7 [====================>-------] 71% 41 secs 142.0 MiB
Area configuration aggregation... 5/7 [====================>-------] 71% 41 secs 142.0 MiB
Area configuration aggregation... 6/7 [========================>---] 85% 58 secs 204.0 MiB
Interception cache generation... 6/7 [========================>---] 85% 58 secs 204.0 MiB
Interception cache generation... 7/7 [============================] 100% 2 mins 204.0 MiB
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_cli -f /html/magento2/bin/magento setup:static-content:deploy de_DE en_US`

 

Nun schweigen nahezu alle Logs, sowohl Apache als auch MySQL Log, nur der PHP Error Log sagt:

 

PHP Fatal error: Uncaught Exception: Warning: PDOStatement::execute(): MySQL server has gone away

Mein erster Verdacht waren Limits. Habe das ganze System + Datenbank von einem Managed- auf einen Rootserver gezogen und die Limits auf utopische Werte hoch gerissen. Immer noch das gleiche Problem.

Ein Ähnliches Problem, bei dem es was gebracht hat die table_open_cache auf dem Datenbankserver auf mindestens 250 zu setzen, brachte nichts.

Die Standard PHP-Limits (exec time, imput time, memory limit) sind natürlich sehr großzügig eingestellt.

Ein Stack Trace hat mich nicht wirklich weiter gebracht. Das hier ist der Part bei dem zuletzt die Datenbankverbindung auf die Nase fällt:

3477 14:08:01.684856 open("/html/magento2/vendor/magento/module-store/Model/ResourceModel/Store/Collection.php", O_RDONLY) = 7
3477 14:08:01.684898 fstat64(7, {st_mode=S_IFREG|0644, st_size=5109, ...}) = 0
3477 14:08:01.684933 fstat64(7, {st_mode=S_IFREG|0644, st_size=5109, ...}) = 0
3477 14:08:01.684966 fstat64(7, {st_mode=S_IFREG|0644, st_size=5109, ...}) = 0
3477 14:08:01.685062 mmap2(NULL, 5109, PROT_READ, MAP_SHARED, 7, 0) = 0xb5208000
3477 14:08:01.685481 munmap(0xb5208000, 5109) = 0
3477 14:08:01.685521 close(7) = 0
3477 14:08:01.686410 stat64("/html/magento2/var/cache/mage--3/mage---e87_APP_5995BC9E33BA56C3690A437CA74DDF2D", 0xbfb89314) = -1 ENOENT (No such file or directory)
3477 14:08:01.686781 send(3, "\245\0\0\0\3SELECT `main_table`.* FROM `store` AS `main_table` ORDER BY CASE WHEN main_table.store_id = 0 THEN 0 ELSE 1 END ASC, main_table.sort_order ASC, main_table.name ASC\n", 169, MSG_DONTWAIT) =
3477 14:08:01.686978 poll([{fd=3, events=POLLIN|POLLERR|POLLHUP, revents=POLLIN}], 1, 1471228928) = 1
3477 14:08:01.687073 recv(3, "", 77, MSG_DONTWAIT) = 0
3477 14:08:01.687777 write(4, "Warning: PDOStatement::execute(): MySQL server has gone away in /html/magento2/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228\n", 155) = 155


Eigenartig jedoch ist, dass wenn ich den Static Content Deploy als eigenen Prozess über die Magento Konsole anstoße, läuft das durch ohne Probleme.

Zuletzt noch allgemeine Versionen:
- Magento 2.1.7
- PHP 7.0.20-fpm
- Apache 2
- MySQL 5.7

Ich bin momentan wirklich ratlos und wäre über jeden Tipp oder gar Lösungsansatz Dankbar. Falls ich Informationen vorenthalten habe die hier wichtig wäre, werde ich diese natürlich nachreichen.

Beste Grüße!