## Please help with `EMFILE: too many open files, open '/opt/buildhome/repo/node_modules/astro/dist/

Please help with EMFILE: too many open files, open '/opt/buildhome/repo/node_modules/astro/dist/cli/throw-and-exit.js' I just spent a whole day trying to debug a weird issue with CI deploys. I have a minimal astro project with 8 pages (total) and a worker.ts file. My worker sends requests from /dashboard to my oracle server, everything else goes to astro static files. Information about my project - Monorepo using turborepo and bun as a package manager, but node as the runtime. - The astro project (ladingpage + blog + worker that acts as a reverse proxy right on the CDN) is the only thing I'm trying to deploy on cloudflare. - link -> https://dietit.co - Build works on my local machine, had to upgrade from ubuntu 20.04.6 to 22.04.5 to make it work, but I think this is a wrangler incompatibility. What I tried: - watch -n 0.5 "lsof -p $(pgrep -f 'node|bun|vite|astro|turbo') | wc -l" when building locally and it barely open files; - skiping the installation step and adding it to the build command with a --filter ./apps/pages arg, so it instals only the astro specific package. It does not make a difference. - Deploying locally with wrangler deploy --config ./wrangler.toml works, so I assume the issue is during build on cloudflare CI. - Read every post on the internet I could find and every message on this discord server with EMFILE or too many open files, open, they did not help me. - Limiting Vite and Turbo with TURBO_WORKERS=2 and VITE_MAX_WORKERS=2 as env variables. Prior to this, I though on using pages and a separate worker, but cloudflare dashboard baited me saying I should use a worker and not use pages. I regret this decision. Can anyone help me?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?