Can't create more than max_prepared_stmt_count statements
See original GitHub issueWhen my server runs for a period of time, this prompt appears.
"can't create more than max_prepared_stmt_count statements".
I checked the status of MySQL and got the following results:
mysql> SHOW GLOBAL STATUS LIKE 'com_stmt%';
+-------------------------+---------+
| Variable_name | Value |
+-------------------------+---------+
| Com_stmt_execute | 6512872 |
| Com_stmt_close | 0 |
| Com_stmt_fetch | 0 |
| Com_stmt_prepare | 18313 |
| Com_stmt_reset | 0 |
| Com_stmt_send_long_data | 0 |
| Com_stmt_reprepare | 0 |
+-------------------------+---------+
mysql> show variables like "%prepared%";
+------------------------------------------------------+-------+
| Variable_name | Value |
+------------------------------------------------------+-------+
| max_prepared_stmt_count | 16382 |
| performance_schema_max_prepared_statements_instances | -1 |
+------------------------------------------------------+-------+
My friend suggested that I can modify mysql’s ‘max_prepared_stmt_count’ to a higher value.I checked the sequelize code and found that the connection pool was just ‘closed’ connection, does not close PreparedStatement.Is there any API can solve this or only can be modifying ‘max_prepared_stmt_count’.very thanks.
Environment
Dialect:
- mysql Sequelize version: 5.3.5 Database version: 8.0.15 Node Version: v10.3.0 OS: Centos 7.5 TypeScript version: 3.4.3
Issue Analytics
- State:
- Created 4 years ago
- Reactions:12
- Comments:11 (5 by maintainers)
Top Results From Across the Web
MySqli Error: Can't create more than ...
As the question is not clear. I will post some ways to avoid this mysql error: Check your client code, you should close...
Read more >Can't create more than max_prepared_stmt_count statements
Short answer: increase max_prepared_stmt_count in MySQL server. Long answer: Many applications, including Laravel, make a terrible use of ...
Read more >Can't create more than max_prepared_stmt_count statements ...
I have Temporal deployed using the latest helm chart (v 1.17.4) with MySQL as its persistence store. I'm periodically seeing the following ...
Read more >How max_prepared_stmt_count can bring down production ...
From MySQL's Doc,. This variable limits the total number of prepared statements in the server. It can be used in environments where there...
Read more >Can't create more than max_prepared_stmt_count statements
16 , and I have no longer this issue by increasing max_prepared_stmt_count statements to the mysql config directly in the server. Thx for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any updates on this? I had the exact same problem on a production server
Yes, this seems to have fixed the issue the first person was having which is the problem we had. We deployed it to production earlier today and it is working well.