Article DetailsDetailsHelp DetailsNeo4j debug.log has a built in logging for monitoring JVM pauses. These pauses indicate a pause for all JVM operations, which includes dbms processing and network activity. Significant enough pauses, either individually or in high frequency have the potential to impact availability, as a server suffering from high JVM pauses is unable to service queries, accept new queries, or participate in cluster operations. Example logging: 2023-02-21 18:37:44.498-0800 WARN [o.n.k.i.c.VmPauseMonitorComponent] Detected VM stop-the-world pause: {pauseTime=281, gcTime=0, gcCount=0} This log line is generated when a monitoring thread's execution frequency drop below a predefined threshold. The monitoring thread is running in a loop, when the loop executes it checks to see the duration since it's last execution. If this duration is large then a predefined value (200ms at the time of writing), the event is logged. The following information is supplied when the event is logged: pauseTime This is the duration of delay between executions of the monitoring thread. This is specified in milliseconds. gcTime This is the calculated approximate duration of the last garbage collection event since the last execution of the monitoring thread. This is specified in milliseconds. This value is supplied from GarbageCollectorMXBean.getCollectionTime(). gcCount This is the calculated number of garbage collections events since the last execution of the monitoring thread. This is specified as a numeric value. The value is calculated from GarbageCollectorMXBean.getCollectionCount(). What causes this event to be logged? The event is only logged when the duration between monitoring thread executions is above a predefined threshold, 200ms at the time of writing. There are a number of reason this event can be logged, a few are described below: Stop-the-World Garbage Collection Because JVM Stop-the-World Garbage Collection pauses halt all threads that are running in the JVM, this will cause the event to be logged when the pause is longer than the predefined threshold. Garbage collection pauses will always include positive gcCount and gcTime. Lack of CPU Resources If the monitoring thread is not given access to a cpu, then the threads execution will be delayed. If this delay is longer than the predefined threshold, the event will be logged. gcCount and gcTime may be 0 when the pause is due to a lack of cpu resources. I/O waits The monitoring thread itself does not use I/O requests. However, if I/O requests are slow or have a high level of concurrency, the cpu cores can be saturated by threads processing the I/O requests. This causes similar behaviour "Lack of CPU Resources" mentioned above. gcCount and gcTime may be 0 when the pause is due to I/O waits. Breakpoints during debugging When debugging user defined procedures, functions or unmanaged extensions, using breakpoints. As the JVM is paused at a breakpoint, this event can be logged. How can view the actual Garbage Collection times? To analyse Garbage collection, logging must be enabled on the JVM. This can be achieved using the following KB article: https://neo4j.com/developer/kb/enabling-gc-logging/ The gc.log files generated can be reviewed for detailed garbage collection times. InformationTitleExplanation of "Detected VM stop-the-world pause" events in debug.logArticle Created Date3/15/2024, 10:55 PMURL Name15117697318163-Explanation-of-Detected-VM-stop-the-world-pause-events-in-debug-logLast Modified Date7/1/2025, 7:09 AM