Unix Technical Forum

Memory leak in JVM C-heap when using JDBC

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 ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 04:34 PM
Ulf
 
Posts: n/a
Default 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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 04:34 PM
Jean Georges Perrin
 
Posts: n/a
Default RE: Memory leak in JVM C-heap when using JDBC

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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:36 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com