Multiple Sentry consumers repeatedly become unhealthy due to Kafka coordinator/session timeouts
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- docker, docker-compose, kafka
- Ambito
- devops, distributed-systems, infrastructure
Direzione di ricerca
Inizia dai log allegati e dalla configurazione standard di Docker Compose, concentrandoti sui timeout del coordinatore Kafka, sui ribilanciamenti dei consumer e sulle transizioni dei container a unhealthy tra i consumer di Sentry e Snuba. Confronta i servizi consumer interessati e individua una modifica di configurazione o di ripristino riproducibile; il lavoro è completato quando i consumer rimangono in salute ed elaborano continuamente i messaggi senza riavvii manuali.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Self-Hosted Version
26.8
CPU Architecture
x86_64
Docker Version
29.7.2
Docker Compose Version
v5.5.0
Machine Specification
- My system meets the minimum system requirements of Sentry
Installation Type
Upgrade from 26.7.2
Steps to Reproduce
-
Deploy a self-hosted Sentry installation using the standard Docker Compose configuration.
-
Start all Sentry services and verify that the consumers initially become healthy.
-
Leave the Sentry installation running under normal workload.
-
Allow the Sentry consumers to process events, performance metrics, buffered segments, monitor tasks, and other Kafka topics.
-
After some time, multiple consumers begin losing communication with the Kafka consumer group coordinator.
-
The issue can be observed in the logs with messages such as:
Consumer group session timed out (in join-state steady) after 45000 ms without a successful response from the group coordinator -
The consumers subsequently report errors such as:
KafkaError{code=NOT_COORDINATOR} KafkaError{code=_WAIT_COORD} KafkaError{code=COORDINATOR_LOAD_IN_PROGRESS} -
The affected containers eventually become
unhealthy. -
Restarting the Sentry stack temporarily restores the consumers to a healthy state.
-
The problem recurs several times per day, requiring approximately 4 Sentry restarts per day.
Affected containers include:
sentry-snuba-subscription-consumer-events-1
sentry-process-segments-1
sentry-post-process-forwarder-errors-1
sentry-monitors-clock-tasks-1
sentry-ingest-monitors-1
sentry-generic-metrics-consumer-1
sentry-events-consumer-1
The issue also affects Snuba's Kafka consumer for:
snuba-commit-log
Expected Result
Sentry consumers should remain connected to their Kafka consumer groups and continue processing messages normally during continuous operation.
The consumer containers should remain healthy and should not require manual restarts.
Temporary Kafka coordinator changes or consumer group rebalances should recover automatically without causing the containers to become unhealthy.
Actual Result
Multiple Sentry consumers periodically lose communication with the Kafka group coordinator and experience approximately 45-second consumer session timeouts.
The logs contain messages such as:
Consumer group session timed out (in join-state steady) after 45000 ms
without a successful response from the group coordinator
followed by:
Broker: Not coordinator
Local: Waiting for coordinator
and:
Broker: Coordinator load in progress
The consumers revoke their Kafka partitions and attempt to rejoin the consumer group.
For example:
Partitions to revoke:
[Partition(topic=Topic(name='events'), index=0)]
and:
Commit failed:
KafkaError{code=_WAIT_COORD,val=-180,str="Local: Waiting for coordinator"}
Snuba exhibits the same behavior on snuba-commit-log, suggesting that the problem is not isolated to a single Sentry consumer.
Additionally, sentry-process-segments-1 frequently reports processing delays such as:
Batch process is taking longer than 5 seconds.
and:
Waited on the process pool longer than 20 seconds.
Waiting for 1 results.
After these Kafka coordinator/session problems, multiple containers become unhealthy.
Restarting the Sentry stack temporarily resolves the problem, but the same behavior returns several times per day, requiring approximately 4 manual restarts per day.
_sentry-process-segments-1_logs.txt
_sentry-post-process-forwarder-errors-1_logs.txt
_sentry-monitors-clock-tasks-1_logs.txt
_sentry-ingest-monitors-1_logs.txt
_sentry-generic-metrics-consumer-1_logs.txt
_sentry-events-consumer-1_logs.txt
_sentry-snuba-subscription-consumer-events-1_logs.txt
Event ID
No response
- Lingua principale
- Shell
- Stelle
- 9.7k
- Fork
- 2k
- Merge medio
- 3g 2h
- PR unite (30g)
- 16
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di getsentry/self-hosted
-
Waiting for: Product Owner
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
getsentry/self-hosted#4644 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
getsentry/self-hosted#4518 · 3 commenti · 1 reazione ·
I maintainer di solito rispondono entro 2 giorni
-
Waiting for: Product Owner
Difficoltà 3/5 1-2 giorni Idoneità per principianti 73/100
getsentry/self-hosted#4642 · 3 commenti · 1 reazione ·
I maintainer di solito rispondono entro 2 giorni
-
Waiting for: Community
Difficoltà 4/5 3-5 giorni Idoneità per principianti 28/100
getsentry/self-hosted#4637 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Waiting for: Product Owner
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
getsentry/self-hosted#4634 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di getsentry/self-hosted
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
ajithakdev/claude-desktop-rpm#43 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
aws/aws-networking-best-practices#256 ·
I maintainer di solito rispondono entro 2 giorni
-
area:terraform source:reader type:content-error
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
stephrobert/blog-roadmap#268 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
fossi-foundation/globalfoundries-pdk-libs-gf180mcu_fd_pv#61 ·
-
openai-directory
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100