Knowledge Base

How do i configure Neo4j so that data/graph.db/messages.log is automatically rotated

As tested and verified with Neo4j 2.3.0, the data/graph.db/messages.log, its size and number of rotated archives is governed by the following parameters in the conf/ file

Name Description Default


Maximum number of history files for the internal log.



Threshold for rotation of the internal log.


With the above default parameters one should expect to see no data/graph.db/messages.log exceed 20MB and we will keep up to 7 archives, namely data/graph.db/messages.log.1, data/graph.db/messages.log.2 …​ data/graph.db/messages.log.7.

If you wish to change the defaults the conf/ file would need to include the new values for

store.internal_log.max_archives=<N number of archives>

store.internal_log.rotation_threshold=<# of bytes before the file is rotated>

and then issue a bin/neo4j restart for the new parameters to take effect.

Prior to 2.3.0 one would need to use the linux built in functionality of logrotate