I'm getting this error when I'm using normal prepared query which is working on one server and on another is not working.
$this->PreparedQuery("UPDATE user_login SET end_time = '?' WHERE id = ?", 692233, 1);
I'm getting this error when I'm using normal prepared query which is working on one server and on another is not working.
$this->PreparedQuery("UPDATE user_login SET end_time = '?' WHERE id = ?", 692233, 1);
As the question is not clear.
I will post some ways to avoid this mysql error:
Check your client code, you should close the prepared stmt object after you do not need it. Please do not leak resources.
If your client code use prepared statement as cache, please close all of them after the program see this error. You can also try not use prepared statement as cache at all, just create one, use it, and delete it.
Use SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
find all your client code, then repeat step 1.
You can also restart mysql server to solve this problem temporary.
I recently run into this problem too. Make sure you're disposing PreparedQuery or any other prepared SQL Command after execution. Disposing calls ClosePreparedStatement.
Increase:
set global max_prepared_stmt_count = 30000;
** Do what you have to do **
Decrease again to default:
set global max_prepared_stmt_count = 16382;