Self-hosted Sentry: ingestion pipeline (relay ↔ web) silently fails after ~18–24h uptime, recurring, no clear root cause found after extensive investigation
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
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- docker, docker-compose, kafka, nginx
- Ambito
- backend, distributed-systems, infrastructure
Direzione di ricerca
Inizia dal log di disconnessione del producer Kafka di taskscheduler e confronta il comportamento dell'health-check di project-config e del backlog di relay durante un'esecuzione di 18–24 ore. Esamina le impostazioni della connessione del producer di relay/taskworker e il comportamento del bridge Docker; il lavoro è completato quando il problema viene riprodotto e viene stabilita una correzione verificata di reconnect, keepalive o networking, con gli offset di ingestion che avanzano dopo un uptime prolungato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Environment
self-hosted (https://develop.sentry.dev/self-hosted/)
What are you trying to accomplish?
Keep our self-hosted Sentry ingestion pipeline running reliably. We're trying to diagnose and report a recurring failure where event ingestion silently stops completely, roughly every 18–24 hours, requiring a full manual restart of relay, web, and all Kafka-touching consumers to recover — with zero human interaction in between failures (confirmed it fails again overnight, unattended).
How are you getting stuck?
relay stops successfully fetching project config from web, even though every individual component tests healthy in isolation:
relaylogsERROR relay_server::services::health_check: Health check probe 'auth' failedrelaylogs a continuous, steady-state backlog (~150–270 entries, cycling) of:
WARN relay_server::services::projects::source::upstream: error fetching project state <key>: deadline exceeded errors=0 pending=N tags.did_error=false tags.was_pending=true
webresponds correctly and fast to both unauthenticated (401 in ~0.1–0.4s) and simple authenticated requests tested viacurlfrom another container (nginx) hittingweb:9000directly on the same Docker bridge network- Kafka accepts manual produces instantly via
kafka-console-producerthroughout the outage - No offsets advance on
ingest-events/ingest-transactions/ingest-attachmentsduring the outage — relay never forwards anything downstream, despite still returning200/event-IDs at the public ingestion edge (nginx→ relay/api/N/envelope/and/store/)
Trigger evidence found: in taskscheduler (long-running, Celery-beat-equivalent):
%6|...|FAIL|sentry.taskworker.taskworker#producer-1| [thrd:kafka:9092/1001]: kafka:9092/1001: Disconnected: connection closed by peer: receive 0 after POLLIN (after 66577654ms in state UP)
66577654ms ≈ 18.5 hours — a long-lived Kafka client connection was in UP state for ~18.5h before the remote peer (Kafka) closed it, discovered only on next use, no proactive reconnect. This periodicity matches the observed failure interval stack-wide.
What we've ruled out (across incidents on 07-17, 07-21, 07-22, 07-24):
Area | Check | Result -- | -- | -- Kafka broker | GC/heap, disk/fsync, KRaft quorum, ISR/replication, controller logs at failure timestamps | Clean every time Kafka data | Full volume wipe + rebuild from empty | Same failure recurs Postgres | Connections (8/100), locks, query duration | Clean Redis | Memory (8.5MB/10GB), eviction stats | Clean Relay credentials | Keypair vs. sentry_relay DB row | Exact match Clock sync | relay/web/host | No skew Relay process | File descriptors (22), threads (18) | Normal Host networking | iptables/firewalld, nf_conntrack_tcp_timeout_established (432000s), tcp_keepalive_time (7200s) | Stock defaults Kafka broker logs | Full unfiltered logs at exact disconnect timestamps | Only routine log-cleaner activity, no restarts/controller events/connection-close lines getsentry/self-hosted#3330 workaround | health.max_memory_percent, spool.envelopes | Applied, no change Relay image freshness | docker image inspect | Unchanged 2+ weeks, rules out bad nightly pull as triggerOpen question: no broker-side or host-conntrack evidence explains why Kafka closed this connection at ~18h. Either a gap in librdkafka's keepalive/reconnect handling for long-idle producer connections, or Docker Engine silently dropping long-idle bridge/NAT state without notifying either endpoint. Would help to know if relay/taskworker's Kafka producer clients set explicit socket.keepalive.enable or an idle-connection-max equivalent, and whether there's a known interaction with Docker bridge networking under long uptime.
Where in the product are you?
Other
Link
No response
DSN
https://[email protected]/3
Version
26.7.0.dev0
- 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