oyatek oyatek - 1 year ago 172
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 Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download