fix(api): add a socket timeout and a health check to the durable Redis streams client
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- python, redis
- Ambito
- backend, distributed-systems
Direzione di ricerca
Start by reading api/oss/src/dbs/redis/shared/engine.py and api/entrypoints/worker_streams.py, focusing on Redis client creation and the consumer loops. Check how XREADGROUP blocking time relates to socket timeouts, then run the worker against a local Redis instance and stop Redis while it reads. Done means both clients recover after Redis returns and stream consumption resumes.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
🤖 The AI agent says:
Problem
The durable Redis streams client has no socket timeout and no health check. When a managed Redis fails over to its standby, an open connection can stop answering without being closed. A call on that connection then waits forever. Retries don't help, because the call never returns. In that case the stream workers stop consuming spans, records and events, and they don't recover until the pod restarts.
The client is built in two places, and both are on release/v0.122.5:
api/oss/src/dbs/redis/shared/engine.py:StreamsEngine.get_redis()callsRedis.from_url(env.redis.uri_durable, decode_responses=False)with nosocket_timeout.api/entrypoints/worker_streams.py: the worker passessocket_timeout=Noneon purpose, becauseXREADGROUPblocks for 5 seconds and a shorter timeout would cut that call.
Fix
- Give both clients a socket timeout that is longer than the longest blocking read. For example, use 15 seconds when
XREADGROUPblocks for 5 seconds. - Set
health_check_interval(for example 30 seconds) andsocket_keepalive=True, so a dead connection is found and replaced. - Make sure that the consumer loops catch
ConnectionErrorandTimeoutError, reconnect, and continue. - Test the fix by stopping a local Redis while a worker reads. Check that the worker reconnects after Redis comes back.
The failover window is short (about half a second when measured). Without a timeout, though, the hang lasts until someone restarts the pod.
- Lingua principale
- TypeScript
- Stelle
- 4.8k
- Fork
- 690
- Merge medio
- 18h 33m
- PR unite (30g)
- 424
Preparare l'ambiente
- Nessun Dockerfile né 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 Agenta-AI/agenta
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Agenta-AI/agenta#7468 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
(bug) The Stop button disappears for a moment before an approval card showsForse di nuovo libera @rishu685 l’ha presa 7 giorni fa e non c’è nessuna pull request aperta. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Agenta-AI/agenta#7446 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
Agenta-AI/agenta#7441 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bug frontend
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Agenta-AI/agenta#7426 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
No CI job runs the mobile app's unit testsForse già presa @Mahaboob-Ashraf l’ha presa 6 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Agenta-AI/agenta#7326 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Agenta-AI/agenta
Issue simili
-
fix(frontend): correct VITE_IS_DEVELPOMENT typo in shared/app.ts and align dev environment flagsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
vicharanashala/ajrasakha#1439 ·
I maintainer di solito rispondono entro 1 giorno
-
Add: TV5Monde AsieApertaapproved check:passed streams:add
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
codex-team/editor.js#3037 ·
-
complexity: trivial good first issue impact: low
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
ueberdosis/tiptap#8522 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
wormhole-foundation/wormhole#5062 ·
I maintainer di solito rispondono entro 1 giorno