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.
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.
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.
Since this is a temporary error, implement retry logic in your application. Use exponential backoff to avoid overwhelming the cluster:
# 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:
raiseFor error 1297, a single retry often succeeds when the temporary condition resolves.
If the error message shows "Out of operation records", increase operation record limits in config.ini on the NDB management node:
[ndbd default]
MaxNoOfConcurrentOperations=100000
MaxNoOfLocalOperations=100000
MaxNoOfConcurrentTransactions=16384Default values are often too low for high-concurrency workloads. After editing config.ini, restart all NDB data nodes:
# Stop NDB cluster
ndb_mgm -e "STOP"
# Restart data nodes
ndbd --reload-config
# Restart SQL nodes
systemctl restart mysqlIf error 410 (REDO log overload) appears, adjust checkpointing and log file settings in config.ini:
[ndbd default]
TimeBetweenLocalCheckpoints=20
NoOfFragmentLogFiles=16
FragmentLogFileSize=256MIncrease NoOfFragmentLogFiles or reduce TimeBetweenLocalCheckpoints to complete checkpoints more frequently. These changes take effect after cluster restart.
If error 1218 (send buffer overload) occurs, increase NDB network buffer allocation in config.ini:
[ndbd default]
SendBufferMemory=4M
TotalSendBufferMemory=256MLarger send buffers prevent network congestion under high query rates. The TotalSendBufferMemory should be 2-4 MB × number of data nodes.
Insufficient DataMemory causes multiple error 1297 variants. In config.ini, set DataMemory to at least 250MB or higher based on your dataset:
[ndbd default]
DataMemory=1024M
IndexMemory=512MCheck current usage in NDB management console:
ndb_mgm
> ALL REPORT MEMORYIf DataMemory is close to 100% utilized, increase it and restart the cluster.
After adjusting configuration, monitor the cluster for error recurrence:
# 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.
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.
ERROR 1064: You have an error in your SQL syntax
How to fix "ERROR 1064: You have an error in your SQL syntax" in MySQL
ERROR 1054: Unknown column in field list
Unknown column in field list
ER_WINDOW_RANGE_FRAME_NUMERIC_TYPE (3589): RANGE frame requires numeric ORDER BY expression
RANGE frame requires numeric ORDER BY expression in MySQL window functions
CR_ALREADY_CONNECTED (2058): Handle already connected
How to fix "CR_ALREADY_CONNECTED (2058): Handle already connected" in MySQL
ER_WINDOW_DUPLICATE_NAME (3591): Duplicate window name
How to fix ER_WINDOW_DUPLICATE_NAME (3591) in MySQL window functions