ODBC timeouts
Kevin Raison <[email protected]>
| Newsgroups | gmane.lisp.clsql.general |
|---|---|
| Organization | Chatsubo.net, LLC |
| Message-ID | <[email protected]> |
Hello. I have a question about timing out queries using clsql. I am connecting to a Microsoft SQL Server database via ODBC and clsql; for the most part everything works just fine. However, when the database crashes or shuts down (which happens more often than I would like, but is out of my control), strange things happen to my clsql connections. It seems as though the open database handles never timeout in those rare cases when the database has gone away. I noticed this line in odbc-constants.lisp: (defconstant $SQL_QUERY_TIMEOUT 0) But I don't see the timeout referenced anywhere else in the clsql code base. Can someone help me out by explaining how I can cause these hanging queries / connections to timeout in a predictable way? I have tried using sb-ext:with-timeout, but the timeout seems to never happen when clsql ends up in this hung state; perhaps something to do with interrupts being disabled in this context? Any ideas or pointers are appreciated. Cheers. Kevin Raison