What is Garbage collection and why enabling it?
A garbage collection event is a complete pause of the java application (ie: neo4j-server).
It can be identified in the debug.log as a
If you notice issues with them such as too many pauses, too long of a pause, pauses causing cluster re-election, etc, you can enabling GC logging for easier integration with monitoring parsers.
Keep in mind the following regarding GC logging:
- GC log files are cleared out when the database is restarted
- They are crucial for the analysis of the Application Performance
- It will add minor overhead
- You might consider enabling this option on your live environments
Enabling GC logging
Save the file and restart your server.
GC log location
The log file will be written to the logs directory as specified
here and named
dbms.gc.log.options differs due to the upgrade from Java 8 to 11 in 4.0.x.
We recommend to leave this commented so neo4j starts with working settings in both versions.
You can review those differences in the table below.
- Last Modified: 2020-10-22 22:13:22 UTC by Dave Gordon.
- Relevant for Neo4j Versions: 3.5, 4.0.
- Relevant keywords logging,garbage collection, heap, memory, jvm.