This is a discussion on Memory leak in JVM C-heap when using JDBC within the Informix forums, part of the Database Server Software category; --> We have been struggling with out of memory errors for quite some time and the reason for these problems ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| We have been struggling with out of memory errors for quite some time and the reason for these problems is now found. If you are using JDBC(2.21.JC6 and 3.00.JC3) and handling large objects (BYTE,TEXT, BLOB ocr CLOB data) the JDBC driver uses temporary files to store the data in. Then the method deleteOnExit is used to remove the file. The problem with deleteOnExit is that it keeps data in the C-heap until the JVM is stopped, which is not done frequently in a server. A normal GC will not free the memory, you have to restart the JVM. There are two workarounds, set the LOBCACHE parameter to -1, data is then stored in memory instead of on disk, or restart the JVM often enough to avoid the problem. There is a feature request to change the code so that it does not use deleteOnExit but no plan for when it will be implemented. Ulf |
| ||||
| I have heard this issue in the past, but also heard the "thing" was corrected in the 3.x branch :-(... Amit? -- European Developer Forum - Strasbourg Illkirch - June 12th 2007 - It's free! Register at http://www.developerforum.eu. > -----Original Message----- > From: informix-list-bounces@iiug.org [mailto:informix-list- > bounces@iiug.org] On Behalf Of Ulf > Sent: Wednesday, May 16, 2007 08:01 > To: informix-list@iiug.org > Subject: Memory leak in JVM C-heap when using JDBC > > > > We have been struggling with out of memory errors for quite some time > and the reason for these problems is now found. If you are using > JDBC(2.21.JC6 and 3.00.JC3) and handling large objects (BYTE,TEXT, > BLOB ocr CLOB data) the JDBC driver uses temporary files to store the > data in. > > Then the method deleteOnExit is used to remove the file. The problem > with deleteOnExit is that it keeps data in the C-heap until the JVM is > stopped, which is not done frequently in a server. A normal GC will > not free the memory, you have to restart the JVM. > There are two workarounds, set the LOBCACHE parameter to -1, data is > then stored in memory instead of on disk, or restart the JVM often > enough to avoid the problem. > > There is a feature request to change the code so that it does not use > deleteOnExit but no plan for when it will be implemented. > > > Ulf > > _______________________________________________ > Informix-list mailing list > Informix-list@iiug.org > http://www.iiug.org/mailman/listinfo/informix-list |