undici: Leaking array buffers
Not sure if this is a user, undici, node or V8 bug but I have case where I have lot’s of ArrayBuffers allocated and never freed in our Node based proxy:
{rss: 4519784448, heapTotal: 25522176, heapUsed: 20927688, external: 722839852, arrayBuffers: 721332770}
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (15 by maintainers)
Commits related to this issue
- fix: socket back pressure memory leak Fixes: https://github.com/nodejs/undici/issues/434 — committed to nodejs/undici by ronag 4 years ago
- fix: socket back pressure memory leak Fixes: https://github.com/nodejs/undici/issues/434 — committed to nodejs/undici by ronag 4 years ago
- fix: socket back pressure memory leak Fixes: https://github.com/nodejs/undici/issues/434 — committed to nodejs/undici by ronag 4 years ago
My current guess it that it has something to do with pause/resume multiple times. This seems to be growing arrayBuffer usage infinitiely:
`Client.request``
I think it might be broken back pressure.
Seem to have the same problem on a totally different service which recently started to use undici
14.8, HTTP
Happens at multiple locations with different node versions.
I see that V8 recently did something with GC of ArrayBuffers. Maybe coincidence…