Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

OutOfMemory with 2000 records.

 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I have written one method, which will save the result set object in to List<Map><String,Object>

below is my method



and my query return 4 columns with 2000 records and i am getting out of memory error.

stacktrace


I wasn't expecting out of memory error with just only 2000 records.

Can anybody help me out with this issue.

after converting result set object into list i am putting it into session and then displaying it on jsp page.

 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will need to increase the heap size or decrease the number of records you cache.


after converting result set object into list i am putting it into session and then displaying it on jsp page.

So, each user on your system will have their own cached version of this list? Isn't this going to fairly dramatically reduce the number of users you can have one JVM? Why do you need to cache the results.
 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The actual result is in millions, i am just picking up 2000 records.

The result is going to be displayed on jsp page.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are not going to be able to display millions of results in a web application.

Why do the resutls need to be in the session to display them on a page?
 
Tim Holloway
Saloon Keeper
Posts: 18303
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're planning on displaying 2000 records on a single JSP, your problems are just beginning. That's way more than most of us can read onscreen without going blind, and the sheer volume of data means that updating the display will take forever.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic