Closed astrakid closed 3 years ago
This does not seem to be an error related to Cachet, but to the MySQL database. The answer to this stackexchange question suggests increasing the max_allowed_packet in your MySQL configuration.
ok. didn't expect mariadb to be the issue, because it worked for about a year or so. however, i changed max_allowed_packet and max_connectios. incident creation was successful, but on updating the incident i get an erro 500 again.
Next Illuminate\Database\QueryException: Error while sending STMT_PREPARE packet. PID=21793 (SQL: select * from
componentswhere
components.
id= 71 and
components.
deleted_at` is null limit 1) in /v
ar/www/Cachet/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
Stack trace:
))
\Commands\IncidentUpdate\CreateIncidentUpdateCommand))
pdateCommand))
UpdateCommand))
eCommand), Object(Closure))
mand))
ject(Illuminate\Database\MySqlConnection))
teIncidentUpdateCommand), Object(Closure))
ncidentUpdateCommand))
s\Dashboard\IncidentUpdateController), 'createIncidentU...')
components
where components
.id
= 71 and components
.deleted_at
is null limit 1) at /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664, ErrorException(code: 0): Error while sending STMT_PREPARE packet. PID=21793 at /var/www/Cachet/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:61)`
any idea?
Mh this also seems to be an issue related to MariaDB. It sounds like the connection is being closed or something. Can you check your wait_timeout and try to increase it?
increased it from 30 to 60. that seems to do the trick. i am wondering why 30s are not enough? but thanks anyway for thehelpful hints!
I don't know. This seems to be a problem with either PDO or Doctrine / DBAL or Laravel, but not with Cachet. If you are interested, feel free to do some research and to let me / us know your findings ;-)
unfortunately i have no knowledge of Laravel etc. but if i find something i will let the community know. thx a lot.
hi, i can create maintenances, but when creating a new incident i receive an error 500. in laravel.logs i see: `Next Doctrine\DBAL\Driver\PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in /var/www/Cachet/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43 Stack trace:
0 /var/www/Cachet/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(212): Doctrine\DBAL\Driver\PDOConnection->exec('ROLLBACK TO SAV...')
[...]`
and in mysql-log (mariadb 10.3.25):
2021-04-26 10:01:31 777 [Warning] Aborted connection 777 to db: 'cachet' user: 'homestead' host: 'localhost' (Got timeout reading communication packets)
what is causing this error? the database itself is working fine (up and running)