Optimize Neo4j disk usage - cleanup and disable JVM crash dumps

Introduction

If Neo4j crashes, the Java Virtual Machine will automatically create a hs_err_pidxxxx.mdmp crash file in the Neo4j_data location. These .mdmp files can be extremely large and can therefore consume a significant amount of disk space. To resolve this issue there are two options:

Clean up the .mdmp files

The .mdmp files can safely be deleted from disk since they are not used or required by CAST Imaging.

Disable JVM crash dumps in neo4j.conf file

If you want to prevent the creation of the .mdmp crash dump files, edit the neo4j.conf file located here:

Microsoft Windows traditional installer:
%APPDATA%\CAST\ImagingSystem\neo4j\neo4j.conf
    
Docker Installer extension (located in the folder created when unzipping the extension):
neo4j\configuration\neo4j.conf

Microsoft Windows via traditional installer

This file is located in the protected %APPDATA% location, therefore you must open the file with elevated permission (this is usually achieved by right clicking your text editor in the Windows start menu and selecting Run as administrator):

Linux

You may need to use elevated permissions to edit this file (for example use sudo).

And add the following lines:

dbms.jvm.additional=-XX:-CreateMinidumpOnCrash
dbms.jvm.additional=-XX:-CreateCoredumpOnCrash

Restart the Neo4j Windows service / Docker container to ensure the changes are taken into account.