Without support from the driver and underlying database client library, timeouts using alarm signals may leave the driver and/or underlying database client library in an inconsistent state.
Always disconnecting after a timeout may help, but isn't guaranteed. Tim. On Mon, Jul 24, 2006 at 04:05:52PM -0400, Kevin Bosak wrote: > I've been trying to find a reliable method for timing out queries that take > too long. I only see a connect timeout in DBI but nothing for timing out a > query. We can't set a timeout on our database either. I've attempted to > use DBIx::DWIW without success. > > I'm also trying to subclass DBI and overriding execute to use Sys::SigAction > for the timeout. Everything works, except when the query times out I'm not > sure how to tell DBI an execute took place but no data was returned. So my > subsequent fetch fails, saying execute wasn't called. > > Any ideas? > > Thanks!