You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux 9bebfbe9802e 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
The bug can be reproduced using this example test code:
asyncfunctionmain(){for(leti=0;i<500;i++){letdata=Buffer.alloc(1024*1024*10);// 10MB bufferletform=newFormData();letblob=newBlob([data],{type: 'application/octet-stream'});form.append('file',blob,'file');try{letres=awaitfetch('http://127.0.0.1:10000/',{method: 'POST',body: form,signal: AbortSignal.timeout(100)});// added timeout of 100ms}catch(e){}console.log(i);}setInterval(()=>{},1000);// don't exit the script}main();
How often does it reproduce? Is there a required condition?
Successfully reproduced every time when tested.
What is the expected behavior? Why is that the expected behavior?
Expected behavior is for the garbage collector to identify the unused buffers and discard them, which is the observed result in node v24.15.0.
What do you see instead?
High memory usage indicating that the buffers are stored in memory permanently.
Additional information
I have also tested this code using packaged Undici version 7.25.0 (the version claimed to be bundled with node v24.16.0) without observing the reported behavior.
Activity