DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=32441>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32441 ------- Additional Comments From [EMAIL PROTECTED] 2006-12-13 11:40 ------- This may perhaps qualify as a separate bug but here goes anyway: This has much bigger impact (than I've seen indicated so far) when used with mysql connector 5.0.4 (and perhaps other versions), and commons-pool 1.3 . Mysql Connection's have the annoying ability to close themselves (specifically when there is a communication breakdown with the server and they are not in High Availability mode). Since the isClosed method checks both the local flag AND the underlying connection's, it returns true, meaning that the mentioned code in close() throws instead of returning the object to the pool!!! This quickly starves the object pool and causes the developer a lot of grief. I am currently patching DBCP for internal use, replacing the isClosed() method with a simple: public boolean isClosed() throws SQLException { return _closed; } While I acknowledge that the check of the wrapped connections' closed state may be useful for something else, it is not compatible with the current close() method - the two unmatched strategies cause a disastrous situation. As for how to reproduce this behavior (if desired), the application I own is a very high throughput multithreaded server running on high powered boxes which writes medium sized chunks (20K) of data to MySQL using 50 threads concurrently, some of the writing is done via stored procedures. Generally the "mysql self-closing" behavior occurs only when mysql server is overwhelmed, or if I slow it down intentionally by doing a dump, etc. I've also seen this problem happen when mysql server crashes naturally or via "kill -9", or when disk is full. References: com.mysql.jdbc.Connection:Line 3200: ------------------------ if ((sqlState != null) && sqlState.equals(SQLError.SQL_STATE_COMMUNICATION_LINK_FAILURE)) cleanup(sqlE); ------------------------ (Cleanup method sets it to closed) -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]