Cached Queries Problem

[prev] [thread] [next] [Date index for 2005/04/27]

From: David Christensen
Subject: Cached Queries Problem
Date: 01:58 on 27 Apr 2005
Hey folks,

I'm running into a problem wherein I periodically get fatal errors 
about prepared statement handle "dbdpg_13" already exists.  This will 
happen even with different queries, accompanied by fatal errors about 
incorrect number of bind values.  It seems like the name which is 
associated with a particular prepare_cached query is being reused.

This seems to be related to a query which returns some invalid results 
(i.e., we've had a die() because of invalid parameters), but it also 
can be just after a period of time.  Hard restarting apache fixes the 
problem for a while, but within a few page loads I start to see the 
problem again.  I've scoured google and the archives to try to find 
some information about why this may be occurring.

Unfortunately, there are any number of pieces in this puzzle.  I'm 
using Class::DBI to provide my object relational model, 
mod_perl-enabled apache as the web server, and HTML::Mason as the 
templating system.  I'm loading Apache::DBI, DBI, and Class::DBI at 
startup, as well as the root of my custom Class::DBI subclass.  
Database driver is DBD::Pg, with postgres 8.0.1 as the backend.

Any ideas?  It seems like the problem is likely with the persistence in 
some way.  I've already added the code from the wiki to set up my own 
dbMain handle, and it does not seem to fix the problem.

Thanks,

David Christensen

(message missing)

Cached Queries Problem
David Christensen 01:58 on 27 Apr 2005

Re: Cached Queries Problem
David Christensen 23:34 on 27 Apr 2005

Re: Cached Queries Problem
Perrin Harkins 04:35 on 28 Apr 2005

Re: Cached Queries Problem
David Christensen 14:08 on 28 Apr 2005

Re: Cached Queries Problem
Michael Peters 14:09 on 28 Apr 2005

Re: Cached Queries Problem
David Christensen 14:25 on 28 Apr 2005

Re: Cached Queries Problem
Perrin Harkins 14:30 on 28 Apr 2005

Re: Cached Queries Problem
David Christensen 14:39 on 28 Apr 2005

Re: Cached Queries Problem
Perrin Harkins 14:59 on 28 Apr 2005

Re: Cached Queries Problem
David Christensen 15:20 on 28 Apr 2005

Generated at 10:24 on 04 May 2005 by mariachi v0.52