Bug #9661 | HEAP overflow | ||
---|---|---|---|
Submitted: | 5 Apr 2005 19:34 | Modified: | 5 Apr 2005 19:53 |
Reporter: | [ name withheld ] | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / J | Severity: | S1 (Critical) |
Version: | 3.1.7 | OS: | Linux (Linux (FC2 and/or Gentoo)) |
Assigned to: | CPU Architecture: | Any |
[5 Apr 2005 19:34]
[ name withheld ]
[5 Apr 2005 19:53]
Mark Matthews
Chances are you're not calling .close() on statements or result sets, which the JDBC specification _requires_ you to do. Connector/J 3.0.x was more lenient about this. In order to meet the requirements of the JDBC compliance test, Connector/J 3.1.x is required to maintain references to all open statements and result sets, therefore if _your_ code doesn't close them, it will look like a memory leak. You might try setting 'dontTrackOpenResources=true' in your JDBC url if you're not able to fix your non-JDBC-compliant code. Connector/J 3.1.8 uses finalizers to take care of some of this automatically for you, but 1) You can't count on it always working and 2) It's very bad practice for JDBC client code to not call .close() on resources as soon as it's done with them.