Can you put commit/rollback's into the END block ?

-----Original Message-----
From: Steve Baldwin [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 27, 2003 8:02 PM
To: [EMAIL PROTECTED]
Subject: Question regarding Apache::DBI


We're using Apache::DBI and running into problems with Apache child
processes not releasing locks.  My current theory for how this happens
goes something like this ...
 
(Our DB is Oracle if that's relevant)
 
script issues an update which is successful, and locks the updated row
does other stuff
cleanup code (issues commit or rollback depending on logical success or
failure (which releases the lock))
 
Now if in the "does other stuff" section, we get a 500 error, it doesn't
get to the cleanup code, which is where the commit/rollback occurs.  We
therefore have an Apache child process that is going to effectively hold
on to this row lock "forever" (or until it terminates).  The user
attempts to re-display the same page, and it hangs because it is
attempting to update the row the other child process has locked.
 
We don't see any contention when we're running plain DBI rather than
Apache::DBI.
 
Does this sound like a plausible explanation for the contention problems
we're seeing, and if so, has anybody got any suggestions for ways of
solving them.
 
Thanks,
 
Steve

Reply via email to