Handling Lockwait Timeout Errors encountered on NDB Cluster (Doc ID 1335917.1)

Last updated on JULY 05, 2016

Applies to:

MySQL Cluster - Version 6.3 and later
Information in this document applies to any platform.

Symptoms

Any transactional DBMS under high concurrency has the potential to hit Lock wait timeout errors. These errors are temporary in nature, and as suggested by MySQL, when this error is hit - retrying the transaction from the application should allow the transaction to proceed.

Only when many of these Lock wait timeout errors occur, or when they occur alongside significant performance drops, does action and investigation beyond retrying the transaction need to occur.

ERROR
-----------------------
Error 1297; Lock wait timeout exceeded; try restarting transaction
Error 1205; handler error HA_ERR_LOCK_WAIT_TIMEOUT
Got temporary error 266 'Time-out in NDB, probably caused by deadlock' from NDB
NDB error code 266: Time-out in NDB, probably caused by deadlock: Temporary error: Timeout expired

Note: The DiskCheckPointSpeed variable has been split in more recent versions to be more granular. Please note that in 7.4.1+ that DiskCheckPointSpeed is deprecated.
Version 6.3/7.3.11
DiskCheckPointSpeed

Version 7.4.1 and later
MinDiskWriteSpeed,
MaxDiskWriteSpeed,
MaxDiskWriteSpeedOtherNodeRestart,
MaxDiskWriteSpeedOwnRestart

 



STEPS
-----------------------
The issue can be reproduced with the following conditions:

  1. Simulate a heavy load on the data nodes using either of the following:
    • Increase Disk I/O, or
    • Set the DiskCheckpointSpeed option to a very low value.
  2. Set the option TimeBetweenEpochsTimeout=0.
  3. Load data nodes until transactions do not return within the TransactionDeadlockDetectionTimeout period.


BUSINESS IMPACT
-----------------------
If Lock wait timeouts occur frequently or with performance drops in general, user applications must retry transactions as they may not always complete before TransactionDeadlockDetectionTimeout. User applications can also experience significant slow down in query processing and response time due to load.

Changes

What normally triggers Lock wait timeouts is one of the following:

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms