Closed mshameti closed 2 months ago
This code isn’t waiting for the response to finish receiving the body before starting the next request. If you await response.blob()
or similar does that reduce memory usage?
Thanks for taking a look! It did not reduce memory usage unfortunately.
I thought I had included that as part of the commented code of things that I tried, will update the repo example later tonight.
updated example
Will have a fix shortly.
What version of Bun is running?
1.1.26+0a37423ba
What platform is your computer?
Linux 6.6.16-linuxkit aarch64
What steps can reproduce the bug?
Code snippet: https://github.com/mshameti/bun-memory-accumulation-formdata-fetch-docker/blob/main/sender/script.js
What is the expected behavior?
No memory accumulation when sending Blobs in FormData with fetch() in Docker.
What do you see instead?
Memory accumulates until container runs out of memory.
Additional information
Container exits with code 137 when it runs out of memory.
Potentially related: https://github.com/oven-sh/bun/issues/5507