node-services and teamhub keep running and flood 500/ECONNREFUSED errors after PostgreSQL exits
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- postgresql, typescript
Direzione di ricerca
Start by tracing how the desktop supervisor shuts down PostgreSQL and how node-services and teamhub handle database or backend failures; the issue names no source files or tests. Inspect the task-worker, agent-memory, run-wake, and voice pollers for retry behavior. Done means dependent services stop or pause when PostgreSQL exits, and repeated failures back off without flooding logs.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
When bundled PostgreSQL (and LiveKit) shut down cleanly on desktop exit/restart ([linger-supervisor] postgres exited code=0 ... reason=not_supervised), node-services and teamhub remained running for ~20 minutes (14:50:45 to 15:11:15) and continuously polled PostgreSQL (127.0.0.1:63743) / TeamHub without shutting down or backing off, producing 2,318 task_worker.drive_failed (HTTP 500) warnings and dozens of memory/voice/wake errors.
Environment
- Linger Desktop:
0.1.10(source-nativemode) - OS: macOS (
Darwin 27.2.0 arm64) - Bundled PostgreSQL:
17.10(pgvector 0.8.6)
Observed Timeline & Redacted Logs
- 14:50:45 (+08:00) — PostgreSQL and LiveKit received shutdown signals and exited cleanly:
# postgres.log
2026-11-27 14:50:45.261 +08 [51245] LOG: received smart shutdown request
2026-11-27 14:50:45.263 +08 [51399] FATAL: terminating connection due to administrator command
...
2026-11-27 14:50:45.288 +08 [51245] LOG: database system is shut down
[linger-supervisor] postgres exited code=0 signal=null uptime_ms=3181033 restart=no reason=not_supervised
# livekit.log
2026-11-27T14:50:45.266+0800 INFO livekit server/main.go:315 exit requested, shutting down {"signal": "terminated", "force": false}
[linger-supervisor] livekit exited code=0 signal=null uptime_ms=3180148 restart=no reason=not_supervised
- 14:51:00 – 15:11:14 (+08:00) —
node-servicesandteamhubstayed alive and continuously errored until PostgreSQL was started again at15:11:14:
# node-services.log
14:51:00.060 WARN [agent-memory] agent_memory.reconcile_failed
error={"name":"NonErrorThrown","reason":"TeamHubRuntimeStateError: TeamHub Runtime State returned HTTP 500: Agent Runtime State request could not be completed"}
{"time":"2026-11-27T06:51:00.079Z","level":"warn","service":"node-services","event":"voice.reconcile_failed","role":"voice","reason":"teamhub_status","status":500}
{"time":"2026-11-27T06:51:01.086Z","level":"error","service":"node-services","event":"memory.report_reconciliation_failed","role":"memory","error":{"name":"Error","message":"connect ECONNREFUSED 127.0.0.1:63743","code":"ECONNREFUSED"}}
{"time":"2026-11-27T06:51:01.087Z","level":"error","service":"node-services","event":"memory_periodic_work_failed","role":"memory","work":"session_triggers"}
14:51:12.199 WARN [run-wake] run_wake.scan_failed
error={"name":"TeamHubRuntimeStateError","reason":"TeamHub Runtime State returned HTTP 500: Agent Runtime State request could not be completed"}
14:51:44.148 WARN [task-worker] task_worker.drive_failed
error={"name":"TeamHubTaskWorkerError","reason":"TeamHub Task Worker request returned HTTP 500: {\"error\":{\"code\":\"INTERNAL_ERROR\",\"message\":\"an unexpected error occurred\",\"request_id\":\"<redacted>\"}}"}
Error volume during that 20-minute window:
task_worker.drive_failed(HTTP 500): 2,318 occurrencesagent_memory.reconcile_failed(HTTP 500): 41 occurrencesrun_wake.scan_failed(HTTP 500): 28 occurrencesmemory_periodic_work_failed/memory.report_reconciliation_failed(ECONNREFUSED 127.0.0.1:63743): 22 / 21 occurrencesvoice.reconcile_failed(HTTP 500): 21 occurrenceswiki_calendar_checkpoint_failed/memory_schedule_run(ECONNREFUSED): 5 / 4 occurrences
- 15:11:14 (+08:00) — PostgreSQL and LiveKit started again when Linger was relaunched, after which errors stopped.
Expected Behavior
- Dependency-ordered shutdown: Stop dependent services (
web,node-services,teamhub) before shutting downpostgres, and ifpostgresexits, cascade-stop or pause dependent services rather than leaving them orphaned. - Exponential backoff on persistent backend/DB failures: Background pollers (
task-worker,agent-memory,run-wake,voice) should back off when hitting repeatedECONNREFUSEDor HTTP500errors to avoid CPU spin and log truncation (bothnode-services.logandteamhub.loghit their 8 MB cap).
- Lingua principale
- TypeScript
- Stelle
- 3.8k
- Fork
- 360
- Merge medio
- 8h 10m
- PR unite (30g)
- 540
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 simplexai-labs/linger
-
bug
Difficoltà 1/5 1-3 ore Idoneità per principianti 90/100
simplexai-labs/linger#904 ·
I maintainer di solito rispondono entro 1 giorno
-
Local model JIT load waits ~22 s for a concurrency probe that always ends unmeasured and is never cachedForse già presa @oldwinter53 l’ha presa oggi. Apertabug
simplexai-labs/linger#896 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
feat(agents): let an Agent choose runtime, model and reasoning effort when it creates an AgentAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
simplexai-labs/linger#888 ·
I maintainer di solito rispondono entro 1 giorno
-
Hand-patches to the protected runtime are silently discarded on upgrade, with no supported overrideAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
simplexai-labs/linger#883 ·
I maintainer di solito rispondono entro 1 giorno
-
Daily memory report silently never runs: 5-minute step ceiling plus a stuck in-memory #scheduled setAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
simplexai-labs/linger#881 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di simplexai-labs/linger
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Bug Nethernet Tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
JSPrismarine/JSPrismarine#3949 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
withkarann/aifoxx#504 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni