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

Too many open files when spinning up multiple kind clusters #1000

Open
1 of 5 tasks
tylerauerbeck opened this issue Mar 9, 2024 · 3 comments
Open
1 of 5 tasks

Too many open files when spinning up multiple kind clusters #1000

tylerauerbeck opened this issue Mar 9, 2024 · 3 comments

Comments

@tylerauerbeck
Copy link

Description

I'm attempting to run a POC locally that requires multiple kind clusters to demonstrate. The first three come up without issue, however the fourth has problems coming up. To be clear, I don't think this has anything to do with kind specifically, but more that I'm bringing up a number of containers that are probably a bit more resource intensive which require adjusting various settings.

Specifically in my case I see the following in the logs of the fourth container

Failed to create inotify object: Too many open files
         Starting systemd-remount-f…nt Root and Kernel File Systems...
Failed to create inotify object: Too many open files
[  OK  ] Finished kmod-static-nodes…reate List of Static Device Nodes.
Failed to create inotify object: Too many open files

Is there a way to easily update the settings to allow for the necessary inotify params to be tuned? Is this easily done as part of a config file vs having to manually do this within the VM itself?

Version

> colima version && limactl --version && qemu-img --version
colima version 0.6.8
git commit: 9b0809d0ed9ad3ff1e57c405f27324e6298ca04f

runtime: docker
arch: aarch64
client: v25.0.4
server: v24.0.9
limactl version 0.20.1
qemu-img version 8.2.1
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers

Operating System

  • macOS Intel <= 13 (Ventura)
  • macOS Intel >= 14 (Sonoma)
  • Apple Silicon <= 13 (Ventura)
  • Apple Silicon >= 14 (Sonoma)
  • Linux

Output of colima status

> colima status
INFO[0000] colima is running using QEMU
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: sshfs
INFO[0000] socket: unix:///Users/tyler/.colima/default/docker.sock

Reproduction Steps

  1. colima start --cpu 6 --memory 24
  2. kind create cluster --name cluster-1
  3. kind create cluster --name cluster-2
  4. kind create cluster --name cluster-3
  5. kind create cluster --name cluster-4 (will fail with the above logs)

Expected behaviour

Four kind clusters can come up without issue within colima

Additional context

I haven't done anything special to configure colima. This is about as clean of an install as can be as I just installed this via homebrew

@bayasdev
Copy link

bayasdev commented Apr 3, 2024

@tylerauerbeck you need to increase the file handler limit of the underlying Linux distro (Ubuntu) running on Colima

  1. Edit /etc/sysctl.conf
fs.inotify.max_user_watches = 1048576
fs.inotify.max_user_instances = 512
  1. Run sudo systctl -p or reboot the Colima VM

@j-sauer
Copy link

j-sauer commented May 3, 2024

@bayasdev How do you edit this file?
I tried to connect to the vm via colima ssh but I only see the file system of my Mac.
Started Colima with
colima start --arch x86_64 --memory 16 --cpu 6 --kubernetes --vm-type vz -s

@bayasdev
Copy link

bayasdev commented May 3, 2024

@bayasdev How do you edit this file?

I tried to connect to the vm via colima ssh but I only see the file system of my Mac.

Started Colima with

colima start --arch x86_64 --memory 16 --cpu 6 --kubernetes --vm-type vz -s

To connecting to the VM you need to type

colima ssh

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

3 participants