Memory grows linearly (~90 MB/h) until "JavaScript heap out of memory" with ~400 instances, most of them stuck in `connecting` (v2.3.7)
Mantenedores costumam responder em até 4 dias
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 12/100
- Tipo de issue
- Bug
- Clareza
- Precisa de esclarecimento
- Status de atividade
- Ativa
- Stack de tecnologia
- docker, nodejs, postgresql, redis, typescript
- Domínio
- backend
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 10.2k
- Forks
- 7.5k
- Merge médio
- 6d 19h
- PRs com merge (30d)
- 4
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de evolution-foundation/evolution-api
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
evolution-foundation/evolution-api#2796 ·
Mantenedores costumam responder em até 4 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
evolution-foundation/evolution-api#2795 ·
Mantenedores costumam responder em até 4 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
evolution-foundation/evolution-api#2782 ·
Mantenedores costumam responder em até 4 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
evolution-foundation/evolution-api#2723 ·
Mantenedores costumam responder em até 4 dias
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 88/100
evolution-foundation/evolution-api#2704 ·
Mantenedores costumam responder em até 4 dias
Todas as issues de evolution-foundation/evolution-api
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
abhigyanpatwari/GitNexus#4124 ·
Mantenedores costumam responder em até 1 dia
-
good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
laaielichter/Godotwright#250 ·
Mantenedores costumam responder em até 1 dia
-
An Antigravity tab can quote an old Assist message as the owner's words in a resumed conversationAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
Mantenedores costumam responder em até 1 dia
-
Retry an empty final answer when Gemini reports MALFORMED_RESPONSE (gemini-4-hydrogen)Talvez já em andamento @waleedkadous assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
iaser-ai/ansari#444 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
[Bug]: Manager UI logo fails to load — broken external URLTalvez já em andamento @kavindu-udara assumiu hoje. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100