How to fix ERROR 1297: Got temporary error from NDB in MySQL

MySQLINTERMEDIATEMEDIUMUpdated Dec 25, 2025· 162 views

ERROR 1297 indicates a temporary issue in MySQL NDB Cluster that may resolve on retry. Common causes include resource exhaustion, node failures, or overloaded REDO logs. Adjusting cluster configuration parameters can prevent recurrence.

Quick fix

Fixes ERROR 1297: Got temporary error from NDB

# Python example
import time
max_retries = 5
retry_delay = 1

for attempt in range(max_retries):
    try:
        # Execute your SQL query
        cursor.execute(sql_statement)
        break
    except mysql.connector.Error as err:
        if err.errno == 1297:
            if attempt < max_retries - 1:
                time.sleep(retry_delay)
                retry_delay *= 2  # Exponential backoff
            else:
                raise
        else:
            raise
  1. Check the specific NDB error code in the error message
  2. Retry the operation with exponential backoff
  3. Increase MaxNoOfConcurrentOperations for error 1217 or 233
  4. Adjust REDO log configuration for error 410
mysql — error
# Python example
import time
max_retries = 5
retry_delay = 1
for attempt in range(max_retries):
try:
# Execute your SQL query
cursor.execute(sql_statement)
break
except mysql.connector.Error as err:
if err.errno == 1297:
if attempt < max_retries - 1:
time.sleep(retry_delay)
retry_delay *= 2 # Exponential backoff
else:
raise
else:
raise
ERROR 1297: Got temporary error from NDB

What this error means

ERROR 1297 (ER_GET_TEMPORARY_ERRMSG) is a generic temporary error wrapper from MySQL NDB Cluster storage engine. Unlike permanent errors (1296), temporary errors indicate transient conditions that may succeed if retried. The error message includes a specific NDB error code (like 410, 1217, 4010) that identifies the root cause. This error typically surfaces during high-load scenarios, cluster topology changes, or resource constraints on NDB data nodes.

Typical symptoms

  • SQL queries intermittently fail with ERROR 1297 during normal operations
  • Bulk insert/update/delete operations abort mid-way
  • Error messages include NDB error codes like 410 (REDO log), 1217 (operation records), or 4010 (node failure)
  • Retrying the same query succeeds, suggesting a transient condition
  • Cluster performance degrades under concurrent load

Common causes

  1. REDO log files overloaded (error 410) when cluster load exceeds checkpoint capacity
  2. Out of operation records (error 1217, 233) when concurrent transactions exceed MaxNoOfConcurrentOperations or MaxNoOfLocalOperations limits
  3. Node failure or shutdown during transaction (error 4010, 270) when cluster nodes restart or crash
  4. Send buffer overload (error 1218) when network bandwidth is insufficient or misconfigured
  5. Insufficient DataMemory allocation on NDB nodes causing memory pressure
  6. Transaction timeouts under heavy concurrent load without adequate TotalSendBufferMemory

How to fix "ERROR 1297: Got temporary error from NDB"

1Check the specific NDB error code in the error message

The error message format is: ERROR 1297 (HY000): Got temporary error XXX '...' from NDBCLUSTER. Note the XXX error code as it determines the root cause.

Common codes:
- 410: REDO log overload
- 1217: Out of local operation records
- 233: Out of transaction coordinator records
- 4010: Node failure during transaction
- 1218: Send buffer overload

For other codes, consult MySQL NDB Cluster documentation.

2Retry the operation with exponential backoff

Since this is a temporary error, implement retry logic in your application. Use exponential backoff to avoid overwhelming the cluster:

python
# Python example
import time
max_retries = 5
retry_delay = 1

for attempt in range(max_retries):
    try:
        # Execute your SQL query
        cursor.execute(sql_statement)
        break
    except mysql.connector.Error as err:
        if err.errno == 1297:
            if attempt < max_retries - 1:
                time.sleep(retry_delay)
                retry_delay *= 2  # Exponential backoff
            else:
                raise
        else:
            raise

For error 1297, a single retry often succeeds when the temporary condition resolves.

3Increase MaxNoOfConcurrentOperations for error 1217 or 233

If the error message shows "Out of operation records", increase operation record limits in config.ini on the NDB management node:

ini
[ndbd default]
MaxNoOfConcurrentOperations=100000
MaxNoOfLocalOperations=100000
MaxNoOfConcurrentTransactions=16384

Default values are often too low for high-concurrency workloads. After editing config.ini, restart all NDB data nodes:

bash
# Stop NDB cluster
ndb_mgm -e "STOP"

# Restart data nodes
ndbd --reload-config

# Restart SQL nodes
systemctl restart mysql
4Adjust REDO log configuration for error 410

If error 410 (REDO log overload) appears, adjust checkpointing and log file settings in config.ini:

ini
[ndbd default]
TimeBetweenLocalCheckpoints=20
NoOfFragmentLogFiles=16
FragmentLogFileSize=256M

Increase NoOfFragmentLogFiles or reduce TimeBetweenLocalCheckpoints to complete checkpoints more frequently. These changes take effect after cluster restart.

5Increase send buffer memory for error 1218

If error 1218 (send buffer overload) occurs, increase NDB network buffer allocation in config.ini:

ini
[ndbd default]
SendBufferMemory=4M
TotalSendBufferMemory=256M

Larger send buffers prevent network congestion under high query rates. The TotalSendBufferMemory should be 2-4 MB × number of data nodes.

6Ensure adequate DataMemory allocation

Insufficient DataMemory causes multiple error 1297 variants. In config.ini, set DataMemory to at least 250MB or higher based on your dataset:

ini
[ndbd default]
DataMemory=1024M
IndexMemory=512M

Check current usage in NDB management console:

bash
ndb_mgm
> ALL REPORT MEMORY

If DataMemory is close to 100% utilized, increase it and restart the cluster.

7Monitor cluster health after changes

After adjusting configuration, monitor the cluster for error recurrence:

bash
# Check cluster status
ndb_mgm -e "SHOW"

# View data node logs
tail -f /var/log/mysql/ndb_XX_cluster.log

# Monitor for ERROR 1297
sudo journalctl -u mysql -f | grep "1297"

If errors continue, check MySQL error log and NDB cluster logs for additional root cause information. Consider scaling the cluster (adding more data nodes) if resource exhaustion persists.

Advanced notes

ERROR 1297 is a wrapper for multiple NDB-specific errors; always extract and log the underlying error code (410, 1217, etc.) for proper diagnosis. Application-level retry logic is essential since NDB temporary errors are common under load. For mission-critical deployments, implement connection pooling (e.g., ProxySQL, MySQL Router) to distribute load across SQL nodes and reduce cluster stress. Consider NDB Cluster tuning: disable unnecessary binary logging on NDB nodes (log_bin=0) if not needed, use ndb_use_transactions=1 to enable row-level locking, and enable adaptive query routing (ndb_allow_copying_alter_table=0) to avoid full-table operations. Monitoring tools like ndb_desc and ndb_mgm REPORT commands help identify bottlenecks before ERROR 1297 surfaces.

Frequently asked questions

What does "ERROR 1297: Got temporary error from NDB" mean?
ERROR 1297 (ER_GET_TEMPORARY_ERRMSG) is a generic temporary error wrapper from MySQL NDB Cluster storage engine. Unlike permanent errors (1296), temporary errors indicate transient conditions that may succeed if retried. The error message includes a specific NDB error code (like 410, 1217, 4010) that identifies the root cause.
How do I fix "ERROR 1297: Got temporary error from NDB"?
ERROR 1297 indicates a temporary issue in MySQL NDB Cluster that may resolve on retry. Common causes include resource exhaustion, node failures, or overloaded REDO logs. Adjusting cluster configuration parameters can prevent recurrence.
What causes "ERROR 1297: Got temporary error from NDB"?
REDO log files overloaded (error 410) when cluster load exceeds checkpoint capacity Out of operation records (error 1217, 233) when concurrent transactions exceed MaxNoOfConcurrentOperations or MaxNoOfLocalOperations limits Node failure or shutdown during transaction (error 4010, 270) when cluster nodes restart or crash
Is the "ERROR 1297: Got temporary error from NDB" error serious?
It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading