DBAtlas · 데이터베이스 운영 아틀라스

429 거부, heap, circuit breaker 압박 진단

Elasticsearch성능

명령어

# Thread pool queue and rejection counts (source of 429):
GET _cat/thread_pool/write,search,get?v&h=node_name,name,active,queue,rejected,completed,size,queue_size&s=rejected:desc
GET _cat/nodes?v&h=name,node.role,heap.percent,ram.percent,cpu,load_1m,disk.used_percent,master&s=heap.percent:desc
# Circuit breaker trips and parent breaker usage:
GET _nodes/stats/breaker?filter_path=nodes.*.name,nodes.*.breakers.*.tripped,nodes.*.breakers.parent
GET _nodes/stats/jvm?filter_path=nodes.*.name,nodes.*.jvm.mem.heap_used_percent,nodes.*.jvm.gc.collectors.old
# Fielddata memory usage (per field):
GET _nodes/stats/indices/fielddata?fields=*&filter_path=nodes.*.indices.fielddata

하는 일

write/search thread pool 큐가 가득 차서 거부된 요청, 노드별 heap/CPU 상태, circuit breaker 발동, old GC 횟수, fielddata 메모리 사용량을 보여 준다.

사용 시점

클라이언트가 429 Too Many Requests 또는 es_rejected_execution_exception을 받을 때, CircuitBreakingException ([parent] Data too large)이 나타날 때, 또는 노드에 긴 GC 정지가 있을 때.

주의

rejected 카운터는 노드 시작 이후 누적값이므로 두 샘플 간 증가량을 본다. queue_size를 늘리면 거부가 가려지지만 heap과 지연이 증가한다. 실제 해결책은 bulk 크기/동시성 축소 또는 용량 추가다. heap이 85% 이상을 유지하고 old GC가 자주 실행되면 노드가 OOM에 가까워진 것이다. text 필드에 fielddata를 활성화하면 heap을 빠르게 소비한다.

DBAtlas에서 열기 →

관련 항목