• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Handling large amount of data in tomcat memory

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys...

I am using windows 2000 OS. How will it matter.
 
JulianInactive KennedyInactive
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
AFAIK, it wouldn't.
 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic