Recovering From Out of Memory Exceptions

This topic describes what happens when GemFire XD runs out of memory.

Since you can store your GemFire XD tables in the Java heap or in off-heap memory, there are two distinct situations where you can run out of memory:

In either case, when threads being throwing out of memory exceptions, GemFire XD closes the cache and disconnects from the distributed system to prevent reading inconsistent data. If your Java heap runs out of memory, you will need to kill and restart your JVM. Any applications or frameworks relying on the JVM must also be shut down and restarted.

If you run out of off-heap memory, you may be able to reuse the existing JVM; however, if you need to modify the configuration of your GemFire XD system, you may need to restart the JVM.

When your run into out of memory exceptions, Pivotal recommends that you:
Note: To help prevent out of memory errors, you can also configure GemFire XD to either evict data from its tables when memory usage hits a certain level or to throw LowMemoryExceptions first by setting the critical-heap-percentage or critical-off-heap-percentage thresholds when either starting your data stores or by using built-in system procedures. See Procedures.