inotify watchers exhausted
I do not know what uresourced does (even after reading the documentation), but it looks like it runs by default on Fedora. I run Fedora Silverblue 36.
I ran out of inotify watches (raised from the default to 16384) and found uresourced and cgroupify had thousands registered:
$ bash ~/Downloads/inotify-consumers
INOTIFY INSTANCES
WATCHES PER
COUNT PROCESS PID USER COMMAND
------------------------------------------------------------
6275 1 1490 joe /usr/libexec/uresourced --user
2850 5 1843 joe /usr/bin/nextcloud --background
2576 2 4942 joe /usr/share/code/code --ms-enable-electron-run-as-n
2129 1 94137 joe /usr/libexec/cgroupify app-gnome-firefox-94133.sco
1751 1 3261 joe /usr/libexec/cgroupify app-gnome-firefox-3254.scop
[snip]
Other instances of cgroupify failed to run:
$ systemctl --user status cgroupify@app-glib-firefox-282548.scope.service
× cgroupify@app-glib-firefox-282548.scope.service
Loaded: loaded (/usr/lib/systemd/user/cgroupify@.service; static)
Active: failed (Result: exit-code) since Tue 2022-07-26 17:57:19 EDT; 7h ago
Process: 282552 ExecStart=/usr/libexec/cgroupify app-glib-firefox-282548.scope (code=exited, status=1/FAILURE)
Main PID: 282552 (code=exited, status=1/FAILURE)
CPU: 5ms
Jul 26 17:57:19 sparky systemd[1391]: Started cgroupify@app-glib-firefox-282548.scope.service.
Jul 26 17:57:19 sparky cgroupify[282552]: Could not add inotify watch!
Jul 26 17:57:19 sparky cgroupify[282552]: Error moving pid 282548 into new cgroup (28)
Jul 26 17:57:19 sparky systemd[1391]: cgroupify@app-glib-firefox-282548.scope.service: Main process exited, code=exited, status=1/FAILURE
Jul 26 17:57:19 sparky systemd[1391]: cgroupify@app-glib-firefox-282548.scope.service: Failed with result 'exit-code'.
As a workaround I have disabled cgroupify with:
systemctl --user mask cgroupify@
I found some other oddities with cgroupify and don't see the benefit (rationale in !9 (merged) does not make sense to me), so I plan to keep it disabled.