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

containers backend can easily exhaust intofiy instances #890

Open
nh2 opened this issue Mar 2, 2018 · 0 comments
Open

containers backend can easily exhaust intofiy instances #890

nh2 opened this issue Mar 2, 2018 · 0 comments

Comments

@nh2
Copy link
Contributor

nh2 commented Mar 2, 2018

The max_user_instances sysctl limit defaults to 128 on NixOS and per user. When NixOS containers are used, the inotify instances for root add up across containers, thus leading to exhaustion and Too many open files already for a few containers.

This is explained in https://kdecherf.com/blog/2015/09/12/systemd-and-the-fd-exhaustion/

Docker sets fs.inotify.max_user_instances=8192 (moby/moby#1044).

We should add to the containers section in the nixops manual that you should increase the limit when using the containers backend (e.g. boot.kernel.sysctl."max_user_instances" = 8192;).

Related NixOS issue I filed: NixOS/nixpkgs#36214

blaggacao pushed a commit to blaggacao/nixpkgs that referenced this issue Jun 23, 2021
Nowadays most applications require a good amount of inotify watches,
so raise our default to what other distros do. If kernel supports it
enable dynamic setting.

fixes NixOS#36214, NixOS#65001 (re-fix)
- NixOS/nixops#890
- divnix/digga#209

replaces: NixOS#112472
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants