Question

PHP Fatal error: Uncaught PDOException: SQLSTATE[40001]

  • 9 May 2023
  • 1 reply
  • 155 views

Badge +2

Hi all,

I’m using Centreon version 21.10.14, the OS is Centos 7 and the database MariaDB. 

I see the following message in /var/log/php-fpm/centreon-error.log

PHP Fatal error:  Uncaught PDOException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction in /usr/share/centreon/www/class/centreonDB.class.php:263
 

I can’t find any references of this error message and I’m wondering what the root cause is.

From time to time my system stops showing any data and I’m starting to debug the issue, could please help me to fix it?

Thank you in advance!
LM


1 reply

Hi,

I just got the same error (SQLSTATE[40001]). With version 22.10.15 on RHEL 8.

I got it using CLAPI to do an import of some services (~500). Each service has only one “setparam”.

But in my case it’s only a warning, Maybe the PHP engine does retry the transaction ? :
 

PHP Warning:  file_put_contents(/var/log/centreon/sql-error.log): Failed to open stream: Permission denied in /usr/share/centreon/www/class/centreonLog.class.php on line 193
Line 1409 : SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

But in your case, considering it’s a fatal error I don’t think so.

This is sad you got no answer. Centreon nowadays seems to care more about selling new flashy features than fixing long lasting core bugs ! ☹️ When you look at the PHP error logs it’s full of warning and errors, this is awful.

Reply