On Fri, 17 Dec 1999, Robert Locke wrote:

> If you use Apache::DBI, make sure that you call "connect" with the
> same arguments as above in your other scripts or you will find
> yourself with more than one connection/process to the database, which
> may not be your intention.  I spotted this by running "httpd -X" and
> noticing that it would spawn a second db connection whenever a session
> was created.

Actually, this whole thread reminds me of a reverse-gotcha to the one
quoted above.

We needed to run without AutoCommit (doesn't everyone?) and have the
ability to commit/rollback manually.

BUT, we were using the SAME centralized connect subroutine in our session
code (that utilized Oracle as a backing store).

So, if any session data was squirreled away in the middle of another
database transaction, we got a premature commit on the non-session SQL.
This took a while to debug! :-)

So, sometimes you WANT to have different connections, which is how we
solved this problem.

-- 
-- Tom Mornini
-- InfoMania Printing and Prepress

Reply via email to