Memory grows linearly (~90 MB/h) until "JavaScript heap out of memory" with ~400 instances, most of them stuck in `connecting` (v2.3.7)
I maintainer di solito rispondono entro 4 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 12/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- docker, nodejs, postgresql, redis, typescript
- Ambito
- backend
Direzione di ricerca
The payload names no source files or tests. Start from the reporter's hypothesis: RxJS subscriptions held by instances stuck in connecting, especially the QR regeneration loop for sessions invalidated with 401, bounded by QRCODE_LIMIT. Reproduce by tracking heap growth per instance, and compare with #1419. Done means identifying which subscription or timer is not released and showing that RSS plateaus afterwards.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Environment
- evoapicloud/evolution-api:v2.3.7, Docker Swarm, 6 GB container limit
NODE_OPTIONS=--max-old-space-size=3584(later raised to 4096), PostgreSQL 14, Redis cache enabled- 413 instances: 62 open, 197 connecting (101 of them with
disconnectionReasonCode401, 62 never paired), 154 close QRCODE_LIMIT=3000
Observed
Container RSS right after a restart: ~570 MB. It then grows linearly, day and night, at ~90 MB/h with no plateau:
- 566 MB → 906 MB in 6 h
- 566 MB → 1,298 MB in 8 h
- 585 MB → 2,684 MB in 21 h
The growth rate does not depend on traffic (same slope at 02:00 as at 14:00).
After ~35 h of uptime the process died with:
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
In the minutes before, the Prisma pool was exhausted (P2024 storm), so the crash looks like the end of a slow leak plus a spike.
A daily restart (cron) keeps it under ~2.8 GB, so I'm using that as a workaround.
Question
v2.3.7 mentions a fix for a leak from multiple RxJS subscriptions, but this growth remains. Is there a known per-instance leak, especially for instances that sit in connecting (QR regeneration loop on sessions invalidated with 401)? Similar symptoms in #1419.
I'm testing QRCODE_LIMIT=60 to see whether the growth rate changes and will report back here.
- Lingua principale
- TypeScript
- Stelle
- 10.2k
- Fork
- 7.5k
- Merge medio
- 6g 19h
- PR unite (30g)
- 4
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 evolution-foundation/evolution-api
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
evolution-foundation/evolution-api#2796 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
evolution-foundation/evolution-api#2795 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
evolution-foundation/evolution-api#2782 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
evolution-foundation/evolution-api#2723 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
evolution-foundation/evolution-api#2704 ·
I maintainer di solito rispondono entro 4 giorni
Tutte le issue di evolution-foundation/evolution-api
Issue simili
-
[Bug]: Manager UI logo fails to load — broken external URLForse già presa @kavindu-udara l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
excalidraw/excalidraw#12743 ·
I maintainer di solito rispondono entro 1 giorno
-
area: cli priority: P2 type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
appandflow/stim#6381 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area: ui-kit type: chore
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
schlessera/brain-kit#4598 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue spec
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100