Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site maintenance this Wednesday, February 1. Disruptions expected as we migrate the forums.

Enabling GC Logging

Node Clone

If you are having issues with Garbage Collection (too many pauses, too long of a pause, pauses causing cluster re-election, etc), you should look at enabling GC logging.

Keep in mind the following regarding GC logging:

  • GC log files are cleared out when the database is restarted.
  • There is a small additional load on the system when this logging is enabled.
  • Only enable this to investigate GC issues/impact, and then disable.

For Neo4j 2.x releases

Uncomment these lines in conf/neo4j-wrapper.conf:

And add this line:

The log file will be written to: data/log/neo4j-gc.log

For Neo4j 3.x releases

Uncomment these lines below in conf/neo4j.conf that are prefaced by # dbms.:

# To enable GC Logging, uncomment this line
# dbms.logs.gc.enabled=true

# GC Logging Options
# see for more information.
#dbms.logs.gc.options=-XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintPromotionFailure -XX:+PrintTenuringDistribution

# Number of GC logs to keep.
# dbms.logs.gc.rotation.keep_number=5

# Size of each GC log that is kept.
# dbms.logs.gc.rotation.size=20m


The log file will be written to the logs directory as specified by
[here]( and named `gc.log.<#>`

Save the file and restart your server.



I tried to enable GC logging but no gc.log files are created. I am using neo4j 3.5.22 enterprise edition (startup) on Ubuntu 18.04.5 LTS (ID_like=debian). Any suggestions?

Thank you,