Failed to create fsnotify watcher: too many open files

I’m running drone on a homemade ubuntu 22.04 microk8s kubernetes deployment.

today every container for running the steps is reporting this error failed to create fsnotify watcher: too many open files

I checked and tuned the open files number for the operating system but I’m not sure the problem lies there.

anyone encountered this issue?

drone/drone:2.11.1
drone/drone-runner-kube:1.0.0-rc.3

solved by appending something like

sysctl -w fs.inotify.max_user_watches=100000
sysctl -w fs.inotify.max_user_instances=100000

to /var/snap/microk8s/current/args/containerd-env