Skip to content

I am facing these error from the database. I am not clear about which Parameter value needs to be update from the parameter group

0

We are using Magento Community version 2.4.2 it is hosted on AWS having EC2/RDS. Currently we are facing these errors which is eventually exhausting the RDS sessions.

Need assistance regarding which parameter needs to be update from the parameter group to fix this issue.

These are the paramters available for wait_time or lock timeout These are the paramters available for wait_time or lock timeout SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction

asked 2 years ago458 views

1 Answer
2

Hi,

A deadlock is usually not something that you can fix at database manager level. It requires to change(s) to application.

This article explains very well what they are: https://www.site24x7.com/learn/resolve-sql-server-deadlocks.html

To fix them, you usually need to ensure that application access SAME resources in SAME order when updating them. If not, you risk having process A owning a write lock on table Tx and willing one on Ty while process B has a write lock on Ty and wants one on Tx. It's the perfect deadlock.

If both A & B access Tx first and then Ty, then you avoid deadlocks. This basic example gives a good idea on how deadlocks occur.

If you cannot guarantee order of access, you will need to handle automatic retry in the application code to retry when the dbms kills on of the transactions to keep going. See the article for that.

Best.

Didier

EXPERT

answered 2 years ago

AWS
EXPERT

reviewed 2 years ago

  • What about this error SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction ? Which Parameter needs to be set?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.