GC occurred in the Elasticsearch cluster

Hi Team,

[2026-09-22T22:20:13,448][WARN ][o.e.m.j.JvmGcMonitorService] [node2] [gc][435482] overhead, spent [4s] collecting in the last [4.6s].

we are faced the GC issue with low heap usage and also we are unable to access the cluster, there is no slowlogs and No abnormal in our cluster

we are using 7.17.x this is our configuration and we are using CMS GC,may i know the reason
````
cluster.name: cluster3
node.name: node3
network.host: ip
http.port: 9201
transport.port: 9301
path.logs: /u01/elasticsearch/logs/es717/${cluster.name}/${node.name}
path.data: /u01/elasticsearch/ESEARCH_DATA/${cluster.name}/${node.name}
http.max_content_length: 300mb
discovery.seed_providers: file
cluster.initial_master_nodes: node1, node2, node3
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: certs/elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: certs/elastic-certificates.p12
indices.memory.index_buffer_size: 20%
indices.fielddata.cache.size: 30%
indices.breaker.fielddata.limit: 20%
indices.recovery.max_bytes_per_sec: 25mb
indices.breaker.total.use_real_memory: true
bootstrap.memory_lock: true
action.destructive_requires_name: true
node.roles: [ data ]
cluster.remote.connect: false
gateway.expected_nodes: 6
cluster.routing.allocation.disk.threshold_enabled: false

Hello @Siva_Karan

The settings and the heap graph alone aren't enough to pinpoint the root cause. The graph shows heap staying below ~46% on all nodes, so this doesn't look like heap pressure. A node spending 4s of 4.6s in GC with low heap usually means the JVM was stalled by the host (swap, CPU contention if several ES nodes share a machine or VM steal time) rather than by garbage.

Could you share:

  • Elasticsearch logs from all nodes for that window, especially the elected master
  • node2's elasticsearch.yml and which nodes are master-eligible (GET _cat/nodes?v&h=name,node.role,master,heap.percent,ram.percent)

7.17 no longer receives fixes, so it's worth planning an upgrade to 9.x

Thanks!!