Zitat von
Spooky
Ich denke das hat nichts direkt mit dem Update zu tun.
Es scheint aber zumindest was damit zu tun zu haben, das ein CronJob nicht beendet werden kann, weil z.B. irgendwas anderes als vorher gemacht wird.
Denn wenn ich die Webseite per htaccess sperre, kann ich zumindest auf der Commandline wieder arbeiten (zumindest komme ich dann selbst wieder an die DB). [Durch das Monitoring wird minütlich die Seite aufgerufen, was dann den CronJob auslöst der die DB-Verbindung aufmacht, aber nicht mehr beendet, so zu mindest meine Erklärung des ganzen].
Ich habe inzwischen versucht das ganze auf der Commandline mal zu machen:
Code:
ssh-username@database:/www/htdocs/username/url$ /usr/bin/php81 vendor/bin/contao-console -vvv contao:cron
08:37:15 CRITICAL [console] Error thrown while running command "-vvv contao:cron". Message: "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away"
[
"exception" => Doctrine\DBAL\Exception\ConnectionLost^ {
#message: "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away"
#code: 2006
#file: "./vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php"
#line: 104
-previous: Doctrine\DBAL\Driver\PDO\Exception^ {#1
#message: "SQLSTATE[HY000]: General error: 2006 MySQL server has gone away"
#code: 2006
#file: "./vendor/doctrine/dbal/src/Driver/PDO/Exception.php"
#line: 28
-previous: PDOException {#2
#message: "SQLSTATE[HY000]: General error: 2006 MySQL server has gone away"
#code: "HY000"
#file: "./vendor/doctrine/dbal/src/Driver/PDO/Connection.php"
#line: 32
+errorInfo: [
"HY000",
2006,
"MySQL server has gone away"
]
trace: {
./vendor/doctrine/dbal/src/Driver/PDO/Connection.php:32 { …}
./vendor/doctrine/dbal/src/Connection.php:1204 { …}
./vendor/contao/core-bundle/src/Repository/CronJobRepository.php:50 { …}
./vendor/contao/core-bundle/src/Cron/Cron.php:119 { …}
./vendor/contao/core-bundle/src/Command/CronCommand.php:36 { …}
./vendor/symfony/console/Command/Command.php:298 { …}
./vendor/symfony/console/Application.php:1058 { …}
./vendor/symfony/framework-bundle/Console/Application.php:96 { …}
./vendor/symfony/console/Application.php:301 { …}
./vendor/symfony/framework-bundle/Console/Application.php:82 { …}
./vendor/symfony/console/Application.php:171 { …}
./vendor/contao/manager-bundle/bin/contao-console:38 { …}
./vendor/bin/contao-console:120 { …}
}
}
-sqlState: "HY000"
trace: {
./vendor/doctrine/dbal/src/Driver/PDO/Exception.php:28 { …}
./vendor/doctrine/dbal/src/Driver/PDO/Connection.php:38 { …}
./vendor/doctrine/dbal/src/Connection.php:1204 { …}
./vendor/contao/core-bundle/src/Repository/CronJobRepository.php:50 { …}
./vendor/contao/core-bundle/src/Cron/Cron.php:119 { …}
./vendor/contao/core-bundle/src/Command/CronCommand.php:36 { …}
./vendor/symfony/console/Command/Command.php:298 { …}
./vendor/symfony/console/Application.php:1058 { …}
./vendor/symfony/framework-bundle/Console/Application.php:96 { …}
./vendor/symfony/console/Application.php:301 { …}
./vendor/symfony/framework-bundle/Console/Application.php:82 { …}
./vendor/symfony/console/Application.php:171 { …}
./vendor/contao/manager-bundle/bin/contao-console:38 { …}
./vendor/bin/contao-console:120 { …}
}
}
-query: Doctrine\DBAL\Query^ {#3
-sql: "UNLOCK TABLES"
-params: []
-types: []
}
trace: {
./vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:104 { …}
./vendor/doctrine/dbal/src/Connection.php:1935 { …}
./vendor/doctrine/dbal/src/Connection.php:1878 { …}
./vendor/doctrine/dbal/src/Connection.php:1206 { …}
./vendor/contao/core-bundle/src/Repository/CronJobRepository.php:50 { …}
./vendor/contao/core-bundle/src/Cron/Cron.php:119 { …}
./vendor/contao/core-bundle/src/Command/CronCommand.php:36 { …}
./vendor/symfony/console/Command/Command.php:298 { …}
./vendor/symfony/console/Application.php:1058 { …}
./vendor/symfony/framework-bundle/Console/Application.php:96 { …}
./vendor/symfony/console/Application.php:301 { …}
./vendor/symfony/framework-bundle/Console/Application.php:82 { …}
./vendor/symfony/console/Application.php:171 { …}
./vendor/contao/manager-bundle/bin/contao-console:38 { …}
./vendor/bin/contao-console:120 { …}
}
},
"command" => "-vvv contao:cron",
"message" => "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away"
]
08:37:15 DEBUG [console] Command "-vvv contao:cron" exited with code "2006"
[
"command" => "-vvv contao:cron",
"code" => 2006
]
In ExceptionConverter.php line 104:
[Doctrine\DBAL\Exception\ConnectionLost (2006)]
An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
Exception trace:
at /www/htdocs/username/url/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:104
Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert() at /www/htdocs/username/url/vendor/doctrine/dbal/src/Connection.php:1935
Doctrine\DBAL\Connection->handleDriverException() at /www/htdocs/username/url/vendor/doctrine/dbal/src/Connection.php:1878
Doctrine\DBAL\Connection->convertExceptionDuringQuery() at /www/htdocs/username/url/vendor/doctrine/dbal/src/Connection.php:1206
Doctrine\DBAL\Connection->executeStatement() at /www/htdocs/username/url/vendor/contao/core-bundle/src/Repository/CronJobRepository.php:50
Contao\CoreBundle\Repository\CronJobRepository->unlockTable() at /www/htdocs/username/url/vendor/contao/core-bundle/src/Cron/Cron.php:119
Contao\CoreBundle\Cron\Cron->run() at /www/htdocs/username/url/vendor/contao/core-bundle/src/Command/CronCommand.php:36
Contao\CoreBundle\Command\CronCommand->execute() at /www/htdocs/username/url/vendor/symfony/console/Command/Command.php:298
Symfony\Component\Console\Command\Command->run() at /www/htdocs/username/url/vendor/symfony/console/Application.php:1058
Symfony\Component\Console\Application->doRunCommand() at /www/htdocs/username/url/vendor/symfony/framework-bundle/Console/Application.php:96
Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /www/htdocs/username/url/vendor/symfony/console/Application.php:301
Symfony\Component\Console\Application->doRun() at /www/htdocs/username/url/vendor/symfony/framework-bundle/Console/Application.php:82
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /www/htdocs/username/url/vendor/symfony/console/Application.php:171
Symfony\Component\Console\Application->run() at /www/htdocs/username/url/vendor/contao/manager-bundle/bin/contao-console:38
include() at /www/htdocs/username/url/vendor/bin/contao-console:120
In Exception.php line 28:
[Doctrine\DBAL\Driver\PDO\Exception (2006)]
SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
Exception trace:
at /www/htdocs/username/url/vendor/doctrine/dbal/src/Driver/PDO/Exception.php:28
Doctrine\DBAL\Driver\PDO\Exception::new() at /www/htdocs/username/url/vendor/doctrine/dbal/src/Driver/PDO/Connection.php:38
Doctrine\DBAL\Driver\PDO\Connection->exec() at /www/htdocs/username/url/vendor/doctrine/dbal/src/Connection.php:1204
Doctrine\DBAL\Connection->executeStatement() at /www/htdocs/username/url/vendor/contao/core-bundle/src/Repository/CronJobRepository.php:50
Contao\CoreBundle\Repository\CronJobRepository->unlockTable() at /www/htdocs/username/url/vendor/contao/core-bundle/src/Cron/Cron.php:119
Contao\CoreBundle\Cron\Cron->run() at /www/htdocs/username/url/vendor/contao/core-bundle/src/Command/CronCommand.php:36
Contao\CoreBundle\Command\CronCommand->execute() at /www/htdocs/username/url/vendor/symfony/console/Command/Command.php:298
Symfony\Component\Console\Command\Command->run() at /www/htdocs/username/url/vendor/symfony/console/Application.php:1058
Symfony\Component\Console\Application->doRunCommand() at /www/htdocs/username/url/vendor/symfony/framework-bundle/Console/Application.php:96
Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /www/htdocs/username/url/vendor/symfony/console/Application.php:301
Symfony\Component\Console\Application->doRun() at /www/htdocs/username/url/vendor/symfony/framework-bundle/Console/Application.php:82
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /www/htdocs/username/url/vendor/symfony/console/Application.php:171
Symfony\Component\Console\Application->run() at /www/htdocs/username/url/vendor/contao/manager-bundle/bin/contao-console:38
include() at /www/htdocs/username/url/vendor/bin/contao-console:120
In Connection.php line 32:
[PDOException (HY000)]
SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
Exception trace:
at /www/htdocs/username/url/vendor/doctrine/dbal/src/Driver/PDO/Connection.php:32
PDO->exec() at /www/htdocs/username/url/vendor/doctrine/dbal/src/Driver/PDO/Connection.php:32
Doctrine\DBAL\Driver\PDO\Connection->exec() at /www/htdocs/username/url/vendor/doctrine/dbal/src/Connection.php:1204
Doctrine\DBAL\Connection->executeStatement() at /www/htdocs/username/url/vendor/contao/core-bundle/src/Repository/CronJobRepository.php:50
Contao\CoreBundle\Repository\CronJobRepository->unlockTable() at /www/htdocs/username/url/vendor/contao/core-bundle/src/Cron/Cron.php:119
Contao\CoreBundle\Cron\Cron->run() at /www/htdocs/username/url/vendor/contao/core-bundle/src/Command/CronCommand.php:36
Contao\CoreBundle\Command\CronCommand->execute() at /www/htdocs/username/url/vendor/symfony/console/Command/Command.php:298
Symfony\Component\Console\Command\Command->run() at /www/htdocs/username/url/vendor/symfony/console/Application.php:1058
Symfony\Component\Console\Application->doRunCommand() at /www/htdocs/username/url/vendor/symfony/framework-bundle/Console/Application.php:96
Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /www/htdocs/username/url/vendor/symfony/console/Application.php:301
Symfony\Component\Console\Application->doRun() at /www/htdocs/username/url/vendor/symfony/framework-bundle/Console/Application.php:82
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /www/htdocs/username/url/vendor/symfony/console/Application.php:171
Symfony\Component\Console\Application->run() at /www/htdocs/username/url/vendor/contao/manager-bundle/bin/contao-console:38
include() at /www/htdocs/username/url/vendor/bin/contao-console:120
contao:cron
Gibt es noch eine Möglichkeit die einzelnen CronJobs separat auflisten zu lassen?
Denn auch das Log gibt nicht mehr raus
Code:
[2023-04-20T08:37:15.878846+02:00] console.CRITICAL: Error thrown while running command "-vvv contao:cron". Message: "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away" {"exception":"[object] (Doctrine\\DBAL\\Exception\\ConnectionLost(code: 2006): An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away at /www/htdocs/username/url/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:104)\n[previous exception] [object] (Doctrine\\DBAL\\Driver\\PDO\\Exception(code: 2006): SQLSTATE[HY000]: General error: 2006 MySQL server has gone away at /www/htdocs/username/url/vendor/doctrine/dbal/src/Driver/PDO/Exception.php:28)\n[previous exception] [object] (PDOException(code: HY000): SQLSTATE[HY000]: General error: 2006 MySQL server has gone away at /www/htdocs/usernameurl/vendor/doctrine/dbal/src/Driver/PDO/Connection.php:32)","command":"-vvv contao:cron","message":"An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away"} []
und irgendwie habe ich keine Lust alle CronJobs einzeln durchzugehen ;-)