OpenSearch

JVM GC Pause Causing Search Latency Spikes

critical
latencyUpdated Feb 6, 2026

Prolonged garbage collection events pause all cluster operations, manifesting as sudden latency spikes in search and indexing. Heap pressure from poorly tuned queries or cache evictions triggers these pauses.

How to detect:

Monitor GC_Collection_Time exceeding thresholds (>1000ms per collection) combined with elevated Heap_Used approaching Heap_Max, particularly when Cache_FieldData_Eviction or Cache_Request_Eviction rates are high.

Recommended action:

Enable heap dump on OOM, analyze query patterns causing cache pressure, tune cache sizes, reduce fielddata usage by using doc_values, and consider increasing heap size or scaling horizontally. Use Performance Analyzer metrics to identify specific queries causing heap allocation spikes.