liveBook · Manning

Stop-the-world event

As explained in Troubleshooting Java, Second Edition

A stop-the-world phase is a garbage-collection phase during which application threads are paused.

A stop-the-world (STW) event is a garbage-collection phase during which application threads are paused. Long pauses can freeze requests and create latency spikes. section 11.4.1

Investigate STW events through GC logs: check pause duration, frequency, and heap recovery. Treat one unusual entry cautiously; recurring long pauses suggest memory pressure or tuning problems. section 11.4.1

Use these questions when reviewing GC output:

  • Do pauses repeatedly exceed roughly 50 milliseconds? section 11.4.1
  • Are minor or full collections occurring unusually often? section 11.4.1
  • Does full GC reclaim little memory, indicating objects may be lingering? section 11.4.1

Reading a pause pattern

A log with pauses rising from 25–27 milliseconds to 110 milliseconds, then 250 milliseconds, 2.567 seconds, and 5.321 seconds shows a recurring deterioration rather than an isolated exception.

How Troubleshooting Java, Second Edition covers it

How deep it goes
Defines paused application threads and evaluates recurring pause durations, stopping short of explaining collector internals.
Examples
Uses escalating young and full GC pauses, including 2.567-second and 5.321-second events, as diagnostic evidence.
What you can do after
Diagnose recurring GC-related latency by inspecting pause duration, event frequency, and memory reclaimed.
How it connects
Connects garbage collection with GC logs, latency, memory pressure, heap utilization, and JVM tuning.

Also explained in

Compare how 2 books explain stop-the-world event →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Troubleshooting Java, Second Edition. The section links point to the parts of the book it draws on.