permaculture playing cards*
The moose likes Performance and the fly likes Out of Memory error / Heap size problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "Out of Memory error / Heap size problem" Watch "Out of Memory error / Heap size problem" New topic
Author

Out of Memory error / Heap size problem

Madhumitha Baskaran
Ranch Hand

Joined: Feb 27, 2010
Posts: 66

Hi,

I have a Java Program which involves fetching of large volume of data from web service. If the volume of data is so high, I encountered out of memory error.
Error looked like

"Processing Dump Event "systhrow", detail "java/lang/OutOfMemoryError"

So I have set the maximum heap size as 256 MB. Then the program is not throwing out of memory error.

I do insert many records in DB2 table one by one. When the heap size was 256 MB, it throws SQLERRMC : mon_heap_sz from DB2 while inserting few records and few records are not getting inserted..

Please tell me some resolution for this problem. This is of high priority and I am not able to figure out the cause or solution.

Thanks in advance,
Madhu
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

I think the resolution would be to change your code so that it doesn't use so much memory.

Of course we can't see any of your code, so that's just a guess. Perhaps you could post a SSCCE (follow the link) which shows the problem in action?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Out of Memory error / Heap size problem
 
Similar Threads
Memor Leak
Heap Size
Heap Size
JVM Out Of Memory...How to increase Heap Size??
Heap Space Error in Tomcat 5.0