-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
createReadStream seems to crash the program/make the file handles hang permanently #7957
Comments
I am facing the same issue with my express server. Each time a file is opened on the server (e.g. to serve the index.html), the file handlers count increases.). |
I ran your test (bun 1.0.21) and did not see the error. I am running on a Mac, so not sure if it is the different platform or the different bun version. |
I have the same issues with 1.0.21, but on Ubuntu and with the official docker image. |
I tried out 1.0.22 ( |
This still needs to be fixed, but in the meanwhile, you can use const foo = await Bun.file("foo.txt").stream(); |
Thx. Any advice how to apply this for Express? |
I'm not sure about Express. There's more info about this in the docs though, if you want to look there. |
createReadStream (on its own or when given a specific file handle) seems to take permanent ownership of its file handle and not let it be closed naturally/manually
bun version: 1.0.20
operating system: debian on wsl 2 (5.10.102.1-microsoft-standard-WSL2)
ulimit size: 1024
code:
output when ran from node.js:
output when ran from bun:
Originally reported on Discord:
createReadStream seems to crash the program/make the file handles hang permanently
The text was updated successfully, but these errors were encountered: