|
|||||||||||
|
RE: Web application jconnector memory Leak
From: Mark Matthews <mark(at)mysql.com>
Date: Fri Aug 17 2007 - 19:50:14 EDT
> -----Original Message----- Tomas, My guess is that you're leaking statements and/or result sets. Version 3.0 was much more tolerant of this, because it wasn't JDBC-compliant. The JDBC specification requires that drivers keep track of open statements and result sets, and close them when the "parent" object is closed. Because of this, connections will have lists of open statements, and statements will have lists of open result sets (so that the driver can close them if the application doesn't). This does have a cost, however, in that the memory used by those instances will not be freed until the "parent" is closed, either implicitly (by the driver), or explicitly (by the application). When a connection pool is in place, this "feature" is even more incidious, as the connection isn't physically closed for quite some time, so statement instances tend to pile up. If you add "dontTrackOpenResources=true" to your JDBC URL configuration parameters, and the problem goes away, then _somewhere_ your application isn't closing result sets or statements that it creates. The JDBC driver can help tell you where this might be, if you add "useUsageAdvisor=true" to the URL, the driver will track where result sets and statements were created, and then not explicitly closed by the application. You'll have to set your connection pool to have 0 or low idle times so that the physical connection is eventually closed however, to catch statement leaks.
-Mark
iD8DBQFGxjQ2tvXNTca6JD8RAgf7AJ9Cki2+g0EGcQEm9UFlBv/M5BRyMQCgslK4
FRqXoO/oInc9hJPL9W9O5Zc=
-- MySQL Java Mailing List For list archives: http://lists.mysql.com/java To unsubscribe: http://lists.mysql.com/java?unsub=lists@pantek.comReceived on Fri Aug 17 19:50:55 2007 This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 10:14:14 EDT |
||||||||||
|
|||||||||||