Soj
Soj

Reputation: 31

Seeing RDS Deadlock errors, could this be tied to IOPS limit

I'm seeing some errors on our AWS RDS MySQL server:

General error: 1205 Lock wait timeout exceeded; try restarting transaction Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

Looked at the RDS console monitoring tab, and there seems read IOPS is cut off 1, perhaps indicating that the disk IO is not keeping up with the requests. Funny thing is that write IOPS does not seem to be cut off 2. In general there's very few app server requests that fail due to the database error, but would like to get this sorted.

CPU load on the RDS server peaks around 50%. This makes me think the db.t3.small RDS size is sufficient.

The database is tiny, just 20GB and was created some years ago, so it's on magnetic storage. Have read that this means there's a limit of 200 IOPS, which matches the approx 150 + 50 IOPS peaks seen. I am therefore thinking about moving to General Purpose SSD. However for the small db this will only provide 100 IOPS as baseline performance according to the docs, but according to the docs, a burst load of 3000IOPS is possible.

Does this sound like a good move, and any other suggestions on what to do?

Upvotes: 2

Views: 828

Answers (1)

Soj
Soj

Reputation: 31

I have been running with General Purpose SSD for a couple of days now. The MySQL deadlock errors have not been seen since, so in case someone else finds the question, change from Magnetic to General Purpose SSD in RDS is certainly something to try out if you have similar problems.

Upvotes: 1

Related Questions