increase inotify watch limits

Bug #2027578 reported by James Page
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Snap
Fix Released
High
James Page

Bug Description

Quite a few apps in k8s use inotify to watch a directory or file including traefik:

2023-07-12T10:37:47.536Z [traefik] time="2023-07-12T10:37:47Z" level=debug msg="*file.Provider provider configuration: {\"directory\":\"/opt/traefik/juju\",\"watch\":true}"
2023-07-12T10:37:47.536Z [traefik] time="2023-07-12T10:37:47Z" level=error msg="Cannot start the provider *file.Provider: error creating file watcher: too many open files"

with lots of containers its really easy to hit the default inotify watch limit.

Revision history for this message
James Page (james-page) wrote :

Blocking limit was actually the max number of inotify instances per user - which defaults to 128

Increasing this to 512 resulted in service being restored and traefik correctly picking up configuration.

Revision history for this message
James Page (james-page) wrote :

sudo sysctl fs.inotify.max_user_instances=512

Changed in snap-openstack:
status: New → Triaged
importance: Undecided → High
Revision history for this message
James Page (james-page) wrote :

INotify instances per user (e.g. limits specified by fs.inotify.max_user_instances):

INSTANCES USER
----------- ------------------
128 root
4 ubuntu
1 systemd-ti+
1 systemd-re+
1 nobody
1 messagebus

looks like we're hovering right on that threshold of 128 user instances

Revision history for this message
James Page (james-page) wrote :
Revision history for this message
James Page (james-page) wrote :
Changed in snap-openstack:
status: Triaged → In Progress
assignee: nobody → James Page (james-page)
Revision history for this message
James Page (james-page) wrote :

Discussed with microk8s folk as well and agreed they would bump to 1024 - so we may be able to drop this delta at some point in time.

James Page (james-page)
Changed in snap-openstack:
status: In Progress → Fix Released
James Page (james-page)
Changed in snap-openstack:
milestone: none → 2023.1.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.