On 4/12/07, Peter Karman <[EMAIL PROTECTED]> wrote: > here's my (admittedly buggy) code for doing this. It caches a single dbh for > each unique RDB registry entry combination of domain.type.dsn. I know that it > breaks under mod_perl -- anyone spot why? (the error I get is from Pg: > "prepared > statement 'dbdpg_1' already exists" after first request, because %cache seems > to > be shared across all apache child processes).
My guess is that your code connects to the database from the parent process in order to do auto-discovery of the tables, and then you end up sharing the same handle when apache forks. Apache::DBI does prevent this, so you might consider using that instead, or else add $$ to your dbh key. Most of what you have here is covered by either Apache::DBI or DBI->connect_cached, except that alarm part. - Perrin ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/rose-db-object