W
Wasp-langβ€’3w ago
abiroot

getDirectoryContents:openDirStream: resource exhausted (Too many open files)

I keep getting this error whenever I do a change to my files. My public folder is still the default one, I haven't done any major changes. What could be causing this error? Below is my wasp start log.
[ Server ] GET /auth/me 304 8.608 ms - -
[ Server ] GET /auth/me 304 6.095 ms - -
[ Server ] GET /auth/me 304 4.772 ms - -
[ Server ] POST /operations/get-customer-portal-url 200 4.568 ms - 13
[ Server ] POST /operations/get-customer-portal-url 200 10.711 ms - 13
[ Server ] GET /auth/me 304 8.394 ms - -
[ Server ] [nodemon] restarting due to changes...
[ Client ] 21:09:19 [vite] page reload /Users/lamba/Projects/WASP/<project>/app/src/payment/areeba/webhook.ts
[ Server ] [nodemon] starting `npm run bundle-and-start || exit 1`
[ Server ]
[ Server ] > [email protected] bundle-and-start
[ Server ] > npm run bundle && npm run start
[ Server ]
🐝 --- Recompiling on file change... ----------------------------------------------


[ Server ]
[ Server ] > [email protected] bundle
[ Server ] > rollup --config --silent
[ Server ] wasp-bin: /Users/lamba/Projects/WASP/<project>/app/public/: getDirectoryContents:openDirStream: resource exhausted (Too many open files)
[ Server ] GET /auth/me 304 8.608 ms - -
[ Server ] GET /auth/me 304 6.095 ms - -
[ Server ] GET /auth/me 304 4.772 ms - -
[ Server ] POST /operations/get-customer-portal-url 200 4.568 ms - 13
[ Server ] POST /operations/get-customer-portal-url 200 10.711 ms - 13
[ Server ] GET /auth/me 304 8.394 ms - -
[ Server ] [nodemon] restarting due to changes...
[ Client ] 21:09:19 [vite] page reload /Users/lamba/Projects/WASP/<project>/app/src/payment/areeba/webhook.ts
[ Server ] [nodemon] starting `npm run bundle-and-start || exit 1`
[ Server ]
[ Server ] > [email protected] bundle-and-start
[ Server ] > npm run bundle && npm run start
[ Server ]
🐝 --- Recompiling on file change... ----------------------------------------------


[ Server ]
[ Server ] > [email protected] bundle
[ Server ] > rollup --config --silent
[ Server ] wasp-bin: /Users/lamba/Projects/WASP/<project>/app/public/: getDirectoryContents:openDirStream: resource exhausted (Too many open files)
5 Replies
kapa.ai
kapa.aiβ€’3w ago
Hi @abiroot. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- The error message getDirectoryContents:openDirStream: resource exhausted (Too many open files) is related to the limit of open files that your system allows at a given time. This limit can be reached if Wasp is watching too many files, which can happen if there are a lot of files in your project or if there are redundant watches. In Wasp, there are several processes that watch files: Wasp itself watches your source files, nodemon watches the generated server files, and vite watches generated client files. All these processes are spawned by the wasp start command, and they all count towards the limit of open files source (https://discord.com/channels/686873244791210014/1212533517360177253). A temporary solution to this problem is to increase the limit of open files in your system. You can do this by running the command ulimit -n 10000 source (https://discord.com/channels/686873244791210014/1212533517360177253). However, the Wasp team is aware of this issue and is working on a fix to reduce the number of watched files and avoid hitting the limit source (https://github.com/wasp-lang/wasp/issues/1844). You can follow the progress on this issue on the Wasp GitHub page. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @abiroot, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
abiroot
abirootβ€’3w ago
Can open files in my IDE cause this? I use Visual Studio code, and currently I have about 10 files open. But this never happened before in previous environments, I have a Apple M2 Pro with 16 GB of rams
Filip
Filipβ€’3w ago
Hey @abiroot, thanks for opening the new thread with this question to avoid polluting the old one. Let's continue here Anyway, do you mind sharing the project so I can try it out?
abiroot
abirootβ€’3w ago
Hey @sodic thank you for your support as always! It got solved by itself after doing a wasp clean
Filip
Filipβ€’3w ago
Very strange, but thanks for reporting!
Want results from more Discord servers?
Add your server