My Oracle Support Banner

ReadWriteBackingMap Configured With Write Behind Can Lead to an OutOfMemoryException With Sporadic Bulk Cache Updates (Doc ID 1360070.1)

Last updated on OCTOBER 20, 2023

Applies to:

Oracle Coherence - Version and later
Information in this document applies to any platform.


This article aims to explain the circumstances that can lead to an OutOfMemoryError when a cache with a Read Write Backing Map, configured to use write-behind, is subjected to sporadic bulk updates, followed immediately by periods of inactivity. 

In this scenario, when the write-behind timeout is reached for the bulk changes, that generates internal events for each change, that are placed on an internal event queue.  This event queue is only flushed asynchronously when there is further activity in the cache. 

Therefore, if there is a short period of heavy activity followed by a period of calm where there's no further activity in the cache, then when the write-behind timeouts trigger, a large number of events are queued up, potentially leading to an OutOfMemoryError if there is insufficient free space on the Java Virtual Machine's (JVM) heap to contain the events. 

The error can look similar to the following, though note that this issue is not dependent on using POF:

However, you've only have a binary heap dump, for example if you are using Sun Java and have -XX:+HeapDumpOnOutOfMemoryError as one of your cache node's java arguments, then using a third part tool such as the Eclipse Memory Analyzer will allow you to generate a histogram from the binary dump.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.