Unable to watch too many open files and memory usage not freed up
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
Same issue as https://github.com/denoland/deno/issues/26071 and https://github.com/denoland/deno/issues/17757
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.
Closing as dupe of https://github.com/denoland/deno/issues/17757