• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Solving OutOfMemoryException

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

We have a requirement of displaying Data in te form of a Map to the End User .

We have lots of Records in the DataBase .

We are starting Oc4j server with options of java -Xms 64M and -Xmx1555M -jar oc4j.jar . But still we are getting Heap OutOfMemoryException .

Please le me the solution how to solve this ??
 
Joe Ess
Bartender
Posts: 9340
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the problem is that your data set is too big to fit into memory, you will have to split your data set into manageable portions. There really isn't much else one can do.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks but we can't split data (Pagination can't be used) as this is a Map and we need to how the entire network at a time .

How can this be solved ??
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are getting OOM and you are sure there is no memory leak then there are only two things that you can do:

1) Increase the JVM memory
2) Decrease the memory usage.

Joe suggested a way to decrease memory usage. If that does not suit your requirement then you have to give more memory to the JVM. Thats about it.


 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13077
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you saying that the finished Map is too large to fit in memory?

-OR-

Are you trying to grab all data to memory before building the Map. (We are talking about a java.util.Map implementation, right?)

Bill
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the concern .

But this is not about java.util.Map

This is all about displaying a Network in form of MAP(Like Google Earth )Images .
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13077
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have to have all data in memory at one time to build the "Map" or can it be created in stages?

Bill
 
tom wangrui
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think your application has memory leak .you can find out it in some tools .such as Jprofiles
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic