cancel
Showing results for 
Search instead for 
Did you mean: 

SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting

SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting

We seem to have an ongoing issue with a Magento 1.8 site, where orders are not being processed properly due to a deadlock message:

 

SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction"

 

I need some assistance in getting this fixed asap please and would welcome some help in laymans terms to resolve this ongoing issue.

Thanks

Steve.

4 REPLIES 4

Re: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restart

Hello @steveplus 

 

Are you using any third party module that is doing save order operation? then disable it and check it?

 

Otherwise increase timeout for db .

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restart

Thanks for the reply - Orders are processed offsite.

(we have two other sites that work fine in the same manner).

 

They are all on a shared server, so I'm not sure I can (or how) I increase the 'timeout for db'. Can you be more specific please?

Re: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restart

Hello @steveplus 

 

you need to increast time out for db connection.

 

One thing check indexer mode, try to change mode to as schedule and check it.


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restart

Thanks, but can you give me clear instructions on this please....

"They are all on a shared server, so I'm not sure I can (or how) I increase the 'timeout for db'. Can you be more specific on how I do this please?"