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

Handling large amount of data in tomcat memory

 
Manish Chhetri
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have a really unique problem with this one..I have a database having 19 tables each of which contains more than 50,000 records and data keeps flowing to these tables (their size keeps increasing). I have joins on these tables. Now i have a web interface through which these data can be viewed. For each user logged in when i get records, the tomcat memory is used..to keep this data. After running this application for 1 day, tomcat gives an out of memory exception. How do i handle this memory problem.

PS: the users are not allowed to view all records. Different users have different rights.
 
satish sathineni
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Manish

I also faced the same solution for longtime i was able to solve it..

first i would like to know the OS ur running the tomcat and version of tomcat webserver....

regards
satish kumar
 
Julian Kennedy
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Manish,

That problem doesn't sound so unique to me; it's an old, old problem. Firstly, are you sure you don't have a memory leak? If you're confident that you don't then (and perhaps anyway) the solution is to implement some sort of caching such that there is a limit on the amount of memory the system will use (that you set). If that memory limit is reached you need some policy for clearing out space (e.g. least recently used data).

Hope that helps.

Jules
 
Manish Chhetri
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys...

I am using windows 2000 OS. How will it matter.
 
Julian Kennedy
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AFAIK, it wouldn't.
 
Vikalp Singh
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even we are faced same problem in our application.
First of all check for the memory leak, and try to reduce the data loading on the basis of some paging rule.
And if you are using Rowset for data load, then try to use CachedrowSet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic