This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Handling large amount of data in tomcat memory

 
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.
 
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
 
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.
 
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.
 
This parrot is no more. It has ceased to be. Now it's a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic