Skip to main content

Problem With Memory

Please note these forums are being decommissioned and use the new and improved forums at
3 replies [Last post]
Joined: 2011-02-15

Hello everybody,

I have this problem.

I'm building an java server application like webservice that wait the incoming connection and, after a sql select , reply with a XML.

This application reiceve a lot of connection and after 10 minute it use all ram memory.

I try to destroy class / variable but is not allow in java.

I try to use System.gc() and it optimized a little bit the memory but it is not enoght!!

How can I solve this problem?

Thank you


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2005-01-30

System.gc wont help. As Brad suggest without looking at code its not possible to detect problems. If its not an obvious problem you could try to profile the code.

Joined: 2007-06-01

Without looking at your code, it is very difficult to know why your program is leaking memory.

However, have a look at these JVM memory and GC switch settings. Don't include the
leading -J part, as this is just for NetBeans to know to pass them onto the JVM.


Joined: 2007-06-01

Sorry, forgot to include link: