Oak Run tool throws OutOfMemory | Running the checkpoint cleanup

Oak Run tool throws out-of-memory error

When you run Oak Run tool to clean up the checkpoint, it throws OutOfMemory.

The logs show the following exception:

Apache Jackrabbit Oak 1.0.6
Checkpoints /wcm/cq-author/crx-quickstart/repository/segmentstore
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at org.apache.jackrabbit.oak.plugins.segment.file.TarReader.loadGraph(TarReader.java:453)
at org.apache.jackrabbit.oak.plugins.segment.file.TarReader.(TarReader.java:481)
at org.apache.jackrabbit.oak.plugins.segment.file.TarReader.openFirstFileWithValidIndex(TarReader.java:230)
at org.apache.jackrabbit.oak.plugins.segment.file.TarReader.open(TarReader.java:107)
at org.apache.jackrabbit.oak.plugins.segment.file.FileStore.(FileStore.java:191)
at org.apache.jackrabbit.oak.plugins.segment.file.FileStore.(FileStore.java:149)
at org.apache.jackrabbit.oak.plugins.segment.file.FileStore.(FileStore.java:154)
at org.apache.jackrabbit.oak.run.Main.checkpoints(Main.java:223)
at org.apache.jackrabbit.oak.run.Main.main(Main.java:121)

 

Rerun the Oak Run tool with different parameters

Make sure that you have 64-bit JVM installed. Then rerun the Oak Run tool with the following parameter.

java -Dtar.memoryMapped=true -Xmx8g -jar oak-run-1.0.7-SNAPSHOT.jar checkpoint

The parameter -Dtar.memoryMapped=true tells the tool to load the segments memory mapped, which means that it's not using the JVM memory but the available native memory.

Additional information

If the repository is huge, Oak Run tool tries to load the segment files in the JVM's memory, causing the out-of-memory error.

 

 Adobe

Get help faster and easier

New user?