Locks, Timeouts, and Deadlocks in MySQL

Q

What Are Impacts on Applications from Locks, Timeouts, and DeadLocks in MySQL?

✍: FYIcenter.com

A

If you are using transactions with REPEATABLE READ isolation level and transaction safe storage engines in your applications, data locks, lock timeouts, and dead lock detections will impact your application in a concurrent multi-user environment like Web sites in several ways:

  • Data Locks - Helping your application to maintain data integrity and keep each user session consistent. But data locks also slows down your applications, since one user session may need to wait for other sessions to release locks before continuing some data operations.
  • Lock Timeouts - Helping your application to avoid long waits and improve response time to user actions. But your application code must catch the lock timeout errors, and deal with them properly, like asking your user to cancel and restart the process.
  • Dead Lock Detections - Helping your application to avoid dead user sessions and improve response time to user actions. But your application code must catch the dead lock errors, and deal with them properly, like asking your user to cancel and restart the process.

 

Database Basics and Terminologies in MySQL

Error: Deadlock Found When Trying to Get Lock in MySQL

Transaction Management: Commit or Rollback in MySQL

⇑⇑ MySQL Database Tutorials

2017-07-21, 2759🔥, 0💬