The Artima Developer Community
Sponsored Link

Java Answers Forum
Java NIO JVM memory problems

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Gerrit

Posts: 4
Nickname: sifman
Registered: Sep, 2005

Java NIO JVM memory problems Posted: Dec 1, 2005 6:56 PM
Reply to this message Reply
Advertisement
Since implementing the usage of NIO classes in a chatserver, I'm experiencing JVM mem leaks. Sometimes it runs out of memory in a few days, other times weeks.

Currently I'm running j2sdk1.4.1_01 (yes, ancient JDK) and code like the following is executing the whole time seeing that it is a chatserver, and chat messages are entered continuously:
/**************************************/
private java.nio.ByteBuffer recvBuffer;
 
//convert bytes to chars
java.nio.CharBuffer buf = this.decoder.decode(this.recvBuffer);
/**************************************/

I understand from some research that I did that with earlier versions of the JDK (even with earlier versions of Merlin[1.4]) that there can be some memory issues, espeically with the NIO buffers that are created and used. Also that it makes a huge difference depending on which OS platform you are using NIO (especially with previous JDK versions). I'm running 2.6.8-gentoo-r3 at the moment.

Anyone has any additional comments to this? Maybe similar issues? I'll be glad to hear your experiences.

PS: Within the next week or so we're upgrading to Tiger and I'll report back on the experiences then, and whether this memory leak is still ungoing. If it still leaks, then at least I'll be able to get a better idea of what is going on by using JConsole, as currently it is impossible to run a profiler on a live production server to monitor the j2sdk1.4.1_01 JDK.

Topic: Combo Values Previous Topic   Next Topic Topic: simple beginners question for exam

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use