[CDBI] Prepared statement handle error under mod_perl

Perrin Harkins perrin at elem.com
Wed Jan 18 23:59:24 GMT 2006


On Wed, 2006-01-18 at 15:35 -0800, Ryan Tate wrote:
> Since the DBD::mysql upgrade to true prepared statements, when I
> switch one of my CDBI Web apps from CGI mode to mod_perl (persistent),
> I will get the following sort of error whenever the app has been out
> of use for several hours (just me using it at moment):
> 
> DBD::mysql::st execute failed: Unknown prepared statement handler (11)
> given to mysql_stmt_execute [for Statement "(SQL cut here)"] at
> /usr/local/share/perl/5.8.4/DBIx/ContextualFetch. pm line 51.

I wonder if the auto-reconnect feature in MySQL is doing a reconnect
without the knowledge of the perl code.  That could cause something like
this.  Try disabling MySQL's auto-reconnect feature.

- Perrin





More information about the ClassDBI mailing list