Post

2 followers Follow
0
Avatar

XML ERROR -> HEAP SPACE OVERFLOW

How can I avoid heap space overflow

I want to cache my objects but after 700000 records it is so slow and pc blocks ...
if I set well the xml it shouldnt be slow because after casching RAM would be free

pleaser refere to this post that I wrote without answer

https://support.gopivotal.com/hc/communities/public/questions/202634956-Out-of-memory-Heap-Space#answer-202112106

Regarss

Fabio Simon

Please sign in to leave a comment.

2 comments

0
Avatar

Hi Fabio, do you know the size of your objects ? What's your JVM heap size ?

From your other post, looks like you're using object size eviction and you may want to use number of entries eviction, BUT note that keys may still be in memory and can consume your JVM heap space, unless you evict and destroy the objects.

For example:
<region-attributes>
<eviction-attributes>
<lru-entry-count maximum="700000" action="overflow-to-disk"/>
</eviction-attributes>
</region-attributes>

William Markito 0 votes
0
Avatar

HI

I tried as you said and to evoid loading id already cached I put 20 records in a map and then cached the map....

System goes faster and sudduntly after 800.000 records casched (x20) I get the following error, but without block the pc or slow...

Exception in thread "UDP Incoming Message Handler" Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
Exception in thread "TimeScheduler.Thread" java.lang.OutOfMemoryError: Java heap space

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Thread-2 StatSampler"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "UDP mcast receiver"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Distributed system shutdown hook"

Thanks

notice that they are more then 100Million of trandactions to cache....

Fabio Simon 0 votes