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

Avoiding Heap Space Memory Problem

 
Ram kanana
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to avoid Heap Space Problem?
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ram kANANA:
How to avoid Heap Space Problem?


One is, keep your session size as small as possible.
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which Server are you using?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See:
http://www.coderanch.com/t/363414/Servlets/java/Out-Memory-Heap-full-exceptions
Where this is being discussed.

The only heap space problem you can have is "not having enough space allocated for your app".
Anything else is not a heap space problem.

You can make your app more lean (as far as memory goes) by not holding on to object references any longer than needed but, often, letting go of them too soon will make your app less efficient in other respects.

If, by caching objects/data in memory, you can avoid repeated disk i/o or database transactions you can greatly improve the performance of your app.

In other words, there is nothing wrong with an app that requires lots of memory, as long as it's putting it to good use and is running on a machine that has the ram that the app needs.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic