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

Build error: EMFILE: too many open files #221

Closed
davidkopp opened this issue Oct 20, 2023 · 1 comment
Closed

Build error: EMFILE: too many open files #221

davidkopp opened this issue Oct 20, 2023 · 1 comment

Comments

@davidkopp
Copy link
Contributor

davidkopp commented Oct 20, 2023

I have only 250 notes in my public digital garden, however, somehow that seems to be too much (I'm using an own server for the build). If I delete e.g. half of them the build works again.

[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] 1. Having trouble writing to "dist/index.html" from "./src/site/notes/Welcome.md" (via EleventyTemplateError)
[11ty] 2. (./src/site/_includes/layouts/index.njk)
[11ty]   Template render error: (/usr/src/app/src/site/_includes/components/pageheader.njk)
[11ty]   EleventyShortcodeError: Error with Nunjucks shortcode `favicons` (via Template render error)
[11ty] 3. EMFILE: too many open files, open 'dist/favicon.ico' (via Template render error)
[11ty]
[11ty] Original error stack trace: Error: EMFILE: too many open files, open 'dist/favicon.ico'

[...]

ERROR: "build:eleventy" exited with 1.

There are some issues around this problem known for eleventy: https://github.com/11ty/eleventy/issues?q=is%3Aissue+EMFILE
However, with my knowledge I was not able to fix the problem.

@davidkopp
Copy link
Contributor Author

Found a solution after looking for the issue in relation to Node.js...
https://stackoverflow.com/questions/8965606/node-and-error-emfile-too-many-open-files

ulimit -n

→ 1024 (too less)

I'm now using the following Docker / Podman build command:

podman build --ulimit nofile=10000:10000  .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant