-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Too many open files / UnknownContentCollectionError: site does not build #7073
Comments
This comment was marked as outdated.
This comment was marked as outdated.
Also same for me, and the site used to build/serve. Same problem locally on macOS and using Netlify. I have a reasonable amount of content, but it used to work. |
More detailed error message : Error: EMFILE: too many open files, open 'D:\Workspace\astro-esse\node_modules\vscode-oniguruma\release\onig.wasm' Node.js v18.15.0` |
Yep, same here. This bug comes in around 2.4.4 - 2.4.3 is entirely fine. Simple reproduction: make a new Astro project with |
I'm slowly digging into this… I seem to have things sort of working for serve now, but not yet for build. Will summarise my findings when done. Even working, the processes are much slower than before. |
@ChrisChinchilla looking at the error messages and changes between 2.4.3 and 2.4.4, my gut says that #6916 might be the source. |
Looks like my suggestion here did cause issues 😬 Perhaps making this part serial or using a promise queue would fix it. astro/packages/astro/src/content/vite-plugin-content-virtual-mod.ts Lines 106 to 132 in d7007a1
|
Here's a brain dump of my notes and things I found that may or may not help others 🤷 Rogue .vscode folder too many open files errors https://facebook.github.io/watchman/docs/install#macos-file-descriptor-limits Remove minor React component Seemed to be posts folder, tried to debug which one Renamed hash from imported medium posts Change file casing to all lower case, remove extra special symbols Too many updates to types at once? So try sere adding chunks of content at a time That gets serve to run Build still stuck and somewhat quiet about what's happening Debug doesn't do much Then build works!
|
Going to now see if that gets a Netlify build to work, no… It gets very close and then times out :( |
Works with 2.5.0 on my end. |
Still not working for me New error after npm install astro@latest Logs
|
Same, I also forgot to note that I could only get anything to work after changing the open file limit on macOS, as I can’t do that on Netlify, there I had to temporarily remove a load of content to get it to work. Not ideal… |
I've made an attempt to fix this at #7125. Appreciate if you can try it with |
Well, as far as I can see, there's nothing in |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Build OK, but very slow Logs
error [object Object]
|
How Big is my project :
|
Will try later myself when back at a computer. Initially my project is about 8000 items of content, but even cutting it down to a fraction of that I an’t get it to build locally without upping the open file limit (on macOS anyway) and as stated, it all used to work totally fine and fairly speedily. Right now, building and serving is slow Lee than some old school SSGs like Jekyll. |
Thanks for the feedback. I've cut another release for Also, if you're using MDX, you can keep an eye on #7151 which should also improve things. |
Thanks for the new release. Unfortunately still not the green light Logs
Best regards Tshitshi |
@ezzle which release had started causing issues for you? The original issue mentioned 2.4.4 which I'm pretty sure I've fixed the cause. Given you have more than 100k files in |
When generating the content collections, should we turn off the watcher? |
Thank you for the support. The issue in my case is related with the number of files in 'src/content'. It appears when >= +-4000K with any Astro version. I am very new in the Astro community, coming fron ApostropheCMS eco-system. I am hoping to achieve a more reactive & lean alternative with astro & alpine as base. Unfortunately, the capacity to serve efficiently >= 1000K files is mandatory. Do you think Astro can help meet that content volume requirement ? The current astro version is 2.5.1. Previously I have been using the default version of the astro-doc project : ["astro": "^2.3.1"]. By the way uninstalling the patch is worst. I got the following error
But installing the patch produce warning for conflicting dependencies version
Best regards Tshitshi
|
That makes sense. We're spinning up one-off Vite servers in some places and turning the watcher off could fix it. You can't shut it down entirely though since Vite always spins it up, but we can configure to ignore watching all files.
We should be able to but seeing that many files is a first for me so maybe we're not doing something right at that scale. However, I think it's diverging from the original issue so I'd suggest opening another issue if you can find out which Astro version starts causing issues. The errors you get are because some other dependencies rely on the latest version of Astro, so you might need to downgrade the others too. Thanks for the update! I'll go ahead and get the fix out then. |
What version of
astro
are you using?2.4.5
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
pnpm
What operating system are you using?
Mac
What browser are you using?
Chrome
Describe the Bug
Site does not build using Astro 2.4.5 (with the latest MDX integration).
The issue seems to start with Astro 2.4.4.
I've used the docs site as an example.
My private site has the same issue.
EMFILE: too many open files, open '/home/projects/github-xwpzeh/src/pages/[lang]/[...slug].astro'
The troubleshooting link provided is https://docs.astro.build/en/reference/errors/unknown-content-collection-error/
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-xwpzeh?file=package.json
Participation
The text was updated successfully, but these errors were encountered: