John Heitmann wrote:
That example makes us look pretty dumb, let me explain how it happened since it may affect you too. We do inter-request caching of $dbh in pnotes. We rely on the destructor of DBI to disconnect; we don't use disconnect() anywhere in our code. We do however use Apache::AuthTIcket-- which does disconnect-- and we pass it our cached $dbh. So you can see how the above example could occur: AuthTicket grabs a dbh, then disconnects it, we still use it because we assume it is connected like normal, but the DBI doesn't like that sequence of events (it recovers the connection, but leaks).
It doesn't seem necessary for Apache::AuthTicket to do that. However, people using Apache::DBI would not have a problem with this since the disconnect doesn't actually disconnect.

- Perrin



Reply via email to