oyatek oyatek - 2 months ago 50
PHP Question

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

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 constatly getting fatal error 'Prepared statement needs to be re-prepared'.

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

Your help is very appreciated, I need to repair it quickly!

UPDATE: The problem has gone after moving to VPS server. Thanks for help.

Answer

This is a possibility: MySQL bug #42041

They suggest upping the value of table_definition_cache.

You can read about re-preparation in the MySQL docs.

Comments