Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java GCC

 
Raj Kumar
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Raj Kumar
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic