Help Center/ TaurusDB/ Troubleshooting/ SQL Issues/ Native Error 1461 Reported by a DB Instance
Updated on 2024-09-05 GMT+08:00

Native Error 1461 Reported by a DB Instance

Scenario

The following error information is displayed when there are large amounts of concurrent read and write requests, large amounts of SQL statements, or in data migration scenarios:

mysql_stmt_prepare failed! error(1461)Can't create more than max_prepared_stmt_count statements (current value: 16382)

Fault Analysis

The max_prepared_stmt_count value ranges from 0 to 1048576. The default value is 16382. This parameter limits the total number of prepared statements in all sessions on mysqld. The current value exceeds the value range of this parameter.

Solution

Set max_prepared_stmt_count to a larger value. The recommended value is 65535.