Skip to content
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

Unable to watch too many open files and memory usage not freed up #26104

Closed
thoriqadillah opened this issue Oct 10, 2024 · 3 comments · Fixed by #26200
Closed

Unable to watch too many open files and memory usage not freed up #26104

thoriqadillah opened this issue Oct 10, 2024 · 3 comments · Fixed by #26200
Labels
2.0 feedback bug Something isn't working correctly linux

Comments

@thoriqadillah
Copy link

Version: Deno 2.0.0
I tried to play around with deno 2.0 by running my nest js project. In nest js, we can watch the file changes during development, and i found deno cannot do the script. here is the error

[4:27:07 PM] Starting compilation in watch mode...

[4:27:19 PM] Found 0 errors. Watching for file changes.

error: Uncaught Error: Too many open files (os error 24)
    at new FsWatcher (ext:runtime/40_fs_events.js:24:17)
    at Object.watchFs (ext:runtime/40_fs_events.js:74:10)
    at ext:deno_node/_fs/_fs_watch.ts:57:21
    at callback (ext:deno_web/02_timers.js:68:7)
    at eventLoopTick (ext:core/01_core.js:210:13)

and then i tried to ran it without the watcher by running deno task start, and the memory usage was not going down, and stucked in about 900 MB. when i ran it using node, the memory usage also went up to ~1 GB, but it went down some seconds later, but not with deno.

i found that deno is running node to make the script works, and i thought its kinda interesting. here is the screenshot
image

@littledivy littledivy added bug Something isn't working correctly 2.0 feedback linux labels Oct 10, 2024
@littledivy
Copy link
Member

Same issue as #26071 and #17757

@thoriqadillah thoriqadillah changed the title Unable to watch too many open files Unable to watch too many open files and memory usage not freed up Oct 10, 2024
@MellKam
Copy link

MellKam commented Oct 10, 2024

Same issue for me. Tried running deno run dev in my Vite + Vue project, but got hit with Uncaught Error: Too many open files (os error 24) right away. Same thing happened with my Astro app. This is on WSL (Ubuntu 22.04), but no issues on macOS.

@lucacasonato
Copy link
Member

Closing as dupe of #17757

littledivy added a commit that referenced this issue Oct 23, 2024
bartlomieju pushed a commit that referenced this issue Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0 feedback bug Something isn't working correctly linux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants