Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002184 [Quercus] minor always 11-17-07 02:53 12-17-07 09:43
Reporter koreth View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 3.1.4
Summary 0002184: IllegalStateException from query on closed connection
Description I've tried, but haven't been able to isolate this into a reproducible test case, so I'm going to just report it in the hopes it rings a bell. It's one of those "I see it in the real code base but only intermittently" things. Sometimes when I perform a query on a connection and the MySQL server has closed it down, something throws an IllegalStateException which gets propagated up the tree and messes up the application.

Here's my patch to JdbcConnectionResource.realQuery() that exposes the exception as a "connection lost" result that the PHP code can recover from, though I would find it more satisfying to know what the actual underlying problem is.

--- a/modules/quercus/src/com/caucho/quercus/lib/db/
+++ b/modules/quercus/src/com/caucho/quercus/lib/db/
@@ -649,6 +649,10 @@ public abstract class JdbcConnectionResource implements Clo
         log.log(Level.WARNING, e.toString(), e);
         return null;
+ } catch (IllegalStateException e) {
+ // call on closed connection
+ saveErrors(new SQLException("Lost connection"));
+ return null;
     return _rs;
Additional Information
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
11-17-07 02:53 koreth New Issue
12-17-07 09:43 ferg Assigned To  => ferg
12-17-07 09:43 ferg Status new => closed
12-17-07 09:43 ferg Resolution open => fixed
12-17-07 09:43 ferg Fixed in Version  => 3.1.5

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
27 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker