Saturday, January 22, 2022

[FIXED] How to get rid of MySQL error 'Prepared statement needs to be re-prepared'

Issue

I've rewritten my site php-code and added MySQL Stored Procedures.

In my local version everything works fine but after I uploaded my site to hosting server I'm constantly getting fatal error 'Prepared statement needs to be re-prepared'.

Sometimes page loads, sometimes loading fails and I see this error. What's that?


Solution

This is a possibility: MySQL bug #42041

They suggest upping the value of table_definition_cache.

You can read about statement caching in the MySQL docs.



Answered By - docwhat

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.