aspose file tools*
The moose likes Java in General and the fly likes Java GCC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java GCC" Watch "Java GCC" New topic
Author

Java GCC

Raj Kumar
Greenhorn

Joined: Feb 24, 2005
Posts: 5
Hi,

We ported our application to a dedicated server and 50% of the physical RAM is allocated to the application. The RAM on the server is 2GB and the application uses 1MB using -Xmx1024M.

However, after some time <12hrs , the memory usage goes to 900MB and stabilizes there for a while and eventually bails out giving java - outofheap error. If the memory is not set using Xmx, it takes 256MB after 2 days. When I allot 1024M, it takes far less time to eat 900MB. I think there is lot of garbage collection going on and this seems to be a problem.

Could someone tell me the appropriate settings for the app to make sure that it does not eat up all the RAM?

Thanks,
Filip Pas
Greenhorn

Joined: Apr 22, 2005
Posts: 12
Sounds like you could be having a memory leak.
If not you could set a specific the garbage collection policy when you're
starting up you're server that'll be more appropriate.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Do you have any probe tools? JDK 5 includes JConsole that gives you a little better view of what's going on inside the JVM.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Raj Kumar
Greenhorn

Joined: Feb 24, 2005
Posts: 5
Thanks guys. Yes, there is a memory leak (400k per connection after 1 day) which we cannot avoid at this time as it is a huge application with lots of modules. We want to buy some time with more RAM.
Filip Pas
Greenhorn

Joined: Apr 22, 2005
Posts: 12
Hey hey, Where there's a will there's a way!
Don't be afraid of refactoring.
It's very natural to have your code evolve over time!
If you need some help post some of the problematic code.

I'm sure someone might come up with a good idea!
 
jQuery in Action, 2nd edition
 
subject: Java GCC