What is Inotify Instance Capacity Low notification?

I am using Fedora KDE spin 38. And after some usage I get a notification saying “Inotify Instance Capacity Low” and

You have too many applications wanting to monitor file changes! When the capacity is exhausted it will prevent further file monitoring from working correctly. Either close some applications or increase the limit. Currently using 92% of instances and 2% of watches.

Screenshot_20230706_172853

There is a button increase instance limit. What does this do and why this notification is being shown. I am a complete noob and a non coder. Please help me understand what to do in this situation.

It notifies of file changes … see link below:

Have you ever wondered why dolphin or any other application stopped noticing file changes? Chances are you ran out of inotify resources. kde-inotify-survey to the rescue! Sporting a kded module to tell you when things are getting dicey and a CLI tool to inspect the state of affairs.

Thank you for pointing in right direction. however what should I as a non coding user do in this? Should i increase the limit if yes how? And what effect it will have.

Think of me as a user who is reading this inotify for the first time.
Should fedora by default increase this? Should there be more noob friendly documentation?

Please execute the kde-inotify-survey command so we can gather the necessary information to assist you. I would also suggest that you increase the max_user_instances value. This specifies an upper limit on the number of inotify instances that can be created per real user ID. Please note, however, that this will increase the amount of kernel memory consumed by inotify.

1 Like

Thank you for the help with the command

{
    "processes": [
        {
            "cmdline": "/usr/lib/systemd/systemd",
            "instances": 3,
            "pid": 1434,
            "uid": 1000,
            "watches": 102
        },
        {
            "cmdline": "/usr/bin/syncthing",
            "instances": 1,
            "pid": 1488,
            "uid": 1000,
            "watches": 1533
        },
        {
            "cmdline": "/usr/bin/kwalletd5",
            "instances": 1,
            "pid": 1729,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/startplasma-x11",
            "instances": 1,
            "pid": 1756,
            "uid": 1000,
            "watches": 0
        },
        {
            "cmdline": "/usr/bin/dbus-broker-launch",
            "instances": 1,
            "pid": 1780,
            "uid": 1000,
            "watches": 4
        },
        {
            "cmdline": "/usr/libexec/uresourced",
            "instances": 1,
            "pid": 2063,
            "uid": 1000,
            "watches": 597
        },
        {
            "cmdline": "/usr/bin/wireplumber",
            "instances": 3,
            "pid": 2066,
            "uid": 1000,
            "watches": 3
        },
        {
            "cmdline": "/usr/libexec/baloo_file",
            "instances": 3,
            "pid": 2070,
            "uid": 1000,
            "watches": 7025
        },
        {
            "cmdline": "/usr/libexec/xdg-desktop-portal",
            "instances": 1,
            "pid": 2079,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/usr/bin/kded5",
            "instances": 3,
            "pid": 2136,
            "uid": 1000,
            "watches": 57
        },
        {
            "cmdline": "/usr/bin/kwin_x11",
            "instances": 1,
            "pid": 2139,
            "uid": 1000,
            "watches": 3
        },
        {
            "cmdline": "/usr/bin/plasmashell",
            "instances": 3,
            "pid": 2192,
            "uid": 1000,
            "watches": 16
        },
        {
            "cmdline": "/usr/libexec/kactivitymanagerd",
            "instances": 1,
            "pid": 2199,
            "uid": 1000,
            "watches": 4
        },
        {
            "cmdline": "/usr/bin/gmenudbusmenuproxy",
            "instances": 1,
            "pid": 2270,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/libexec/org_kde_powerdevil",
            "instances": 2,
            "pid": 2272,
            "uid": 1000,
            "watches": 3
        },
        {
            "cmdline": "/usr/bin/ksystemstats",
            "instances": 2,
            "pid": 2295,
            "uid": 1000,
            "watches": 3
        },
        {
            "cmdline": "/usr/bin/nextcloud",
            "instances": 3,
            "pid": 2450,
            "uid": 1000,
            "watches": 38
        },
        {
            "cmdline": "/usr/bin/abrt-applet",
            "instances": 1,
            "pid": 2461,
            "uid": 1000,
            "watches": 8
        },
        {
            "cmdline": "/usr/libexec/kdeconnectd",
            "instances": 3,
            "pid": 2471,
            "uid": 1000,
            "watches": 4
        },
        {
            "cmdline": "/usr/libexec/DiscoverNotifier",
            "instances": 2,
            "pid": 2505,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/usr/libexec/xdg-desktop-portal-gtk",
            "instances": 1,
            "pid": 2538,
            "uid": 1000,
            "watches": 68
        },
        {
            "cmdline": "/usr/bin/dbus-broker-launch",
            "instances": 1,
            "pid": 2676,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/akonadi_akonotes_resource",
            "instances": 1,
            "pid": 2896,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/akonadi_ical_resource",
            "instances": 1,
            "pid": 2901,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/akonadi_maildir_resource",
            "instances": 1,
            "pid": 2908,
            "uid": 1000,
            "watches": 16
        },
        {
            "cmdline": "/usr/bin/akonadi_maildir_resource",
            "instances": 1,
            "pid": 2910,
            "uid": 1000,
            "watches": 63
        },
        {
            "cmdline": "/usr/libexec/flatpak-session-helper",
            "instances": 1,
            "pid": 3154,
            "uid": 1000,
            "watches": 3
        },
        {
            "cmdline": "/usr/bin/dolphin",
            "instances": 4,
            "pid": 3424,
            "uid": 1000,
            "watches": 9
        },
        {
            "cmdline": "/tmp/.mount_krita-C19Ne4/usr/bin/krita",
            "instances": 2,
            "pid": 4048,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/home/raghu/store/Krita/nightly/krita-nightly",
            "instances": 1,
            "pid": 4061,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/gwenview",
            "instances": 5,
            "pid": 4920,
            "uid": 1000,
            "watches": 7
        },
        {
            "cmdline": "/usr/lib64/firefox/firefox",
            "instances": 2,
            "pid": 5227,
            "uid": 1000,
            "watches": 10
        },
        {
            "cmdline": "/usr/libexec/cgroupify",
            "instances": 1,
            "pid": 5260,
            "uid": 1000,
            "watches": 112
        },
        {
            "cmdline": "/usr/bin/plasma-browser-integration-host",
            "instances": 1,
            "pid": 5538,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/libexec/kf5/kio_http_cache_cleaner",
            "instances": 1,
            "pid": 8872,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/konsole",
            "instances": 3,
            "pid": 15001,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/usr/bin/zsh",
            "instances": 1,
            "pid": 15017,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "inkscape",
            "instances": 3,
            "pid": 25534,
            "uid": 1000,
            "watches": 4
        },
        {
            "cmdline": "/usr/bin/python3",
            "instances": 1,
            "pid": 27266,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "gpg-agent",
            "instances": 2,
            "pid": 27303,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/usr/libexec/kf5/kioslave5",
            "instances": 2,
            "pid": 32005,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/usr/libexec/kf5/kioslave5",
            "instances": 4,
            "pid": 33106,
            "uid": 1000,
            "watches": 5
        },
        {
            "cmdline": "kde-inotify-survey",
            "instances": 1,
            "pid": 34307,
            "uid": 1000,
            "watches": 1
        }
    ],
    "totals": {
        "instancePercent": 60,
        "instances": 78,
        "maxInstances": 128,
        "maxWatches": 524288,
        "watchPercent": 1,
        "watches": 9719
    }
}

this is the current situation. I will run this command when I get the notification again and post here.

Currently, the report shows that there are 78 instances, and the limit on the number of inotify instances is 128. You can increase this limit to a higher value, such as 256, but please note this would lead to higher memory usage. To do this, use the following command:

sudo sh -c "echo fs.inotify.max_user_instances=256 >> /etc/sysctl.conf" && sudo sysctl -p

Another solution is to close some applications that create too many inotify instances, as suggested by the popup in your screenshot. You can check which applications are creating inotify instances, and how many instances are being created, using the kde-inotify-survey command.

1 Like

I ran the command again when I got the notification and this is the result

 kde-inotify-survey
{
    "processes": [
        {
            "cmdline": "/usr/lib/systemd/systemd",
            "instances": 3,
            "pid": 1444,
            "uid": 1000,
            "watches": 122
        },
        {
            "cmdline": "/usr/bin/syncthing",
            "instances": 1,
            "pid": 1507,
            "uid": 1000,
            "watches": 1543
        },
        {
            "cmdline": "/usr/bin/kwalletd5",
            "instances": 1,
            "pid": 1750,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/startplasma-x11",
            "instances": 1,
            "pid": 1777,
            "uid": 1000,
            "watches": 0
        },
        {
            "cmdline": "/usr/bin/dbus-broker-launch",
            "instances": 1,
            "pid": 1801,
            "uid": 1000,
            "watches": 4
        },
        {
            "cmdline": "/usr/libexec/uresourced",
            "instances": 1,
            "pid": 2084,
            "uid": 1000,
            "watches": 1478
        },
        {
            "cmdline": "/usr/bin/wireplumber",
            "instances": 3,
            "pid": 2087,
            "uid": 1000,
            "watches": 3
        },
        {
            "cmdline": "/usr/libexec/baloo_file",
            "instances": 3,
            "pid": 2091,
            "uid": 1000,
            "watches": 7696
        },
        {
            "cmdline": "/usr/libexec/xdg-desktop-portal",
            "instances": 1,
            "pid": 2099,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/usr/bin/kded5",
            "instances": 3,
            "pid": 2157,
            "uid": 1000,
            "watches": 57
        },
        {
            "cmdline": "/usr/bin/plasmashell",
            "instances": 3,
            "pid": 2210,
            "uid": 1000,
            "watches": 31
        },
        {
            "cmdline": "/usr/libexec/kactivitymanagerd",
            "instances": 1,
            "pid": 2213,
            "uid": 1000,
            "watches": 4
        },
        {
            "cmdline": "/usr/bin/gmenudbusmenuproxy",
            "instances": 1,
            "pid": 2295,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/libexec/org_kde_powerdevil",
            "instances": 2,
            "pid": 2299,
            "uid": 1000,
            "watches": 3
        },
        {
            "cmdline": "/usr/bin/ksystemstats",
            "instances": 2,
            "pid": 2333,
            "uid": 1000,
            "watches": 3
        },
        {
            "cmdline": "/usr/bin/nextcloud",
            "instances": 3,
            "pid": 2524,
            "uid": 1000,
            "watches": 38
        },
        {
            "cmdline": "/usr/bin/abrt-applet",
            "instances": 1,
            "pid": 2541,
            "uid": 1000,
            "watches": 7
        },
        {
            "cmdline": "/usr/libexec/kdeconnectd",
            "instances": 3,
            "pid": 2552,
            "uid": 1000,
            "watches": 4
        },
        {
            "cmdline": "/usr/libexec/DiscoverNotifier",
            "instances": 2,
            "pid": 2595,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/usr/libexec/xdg-desktop-portal-gtk",
            "instances": 1,
            "pid": 2635,
            "uid": 1000,
            "watches": 68
        },
        {
            "cmdline": "/usr/bin/dbus-broker-launch",
            "instances": 1,
            "pid": 2784,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/akonadi_akonotes_resource",
            "instances": 1,
            "pid": 2962,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/akonadi_ical_resource",
            "instances": 1,
            "pid": 2968,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/akonadi_maildir_resource",
            "instances": 1,
            "pid": 2974,
            "uid": 1000,
            "watches": 16
        },
        {
            "cmdline": "/usr/bin/akonadi_maildir_resource",
            "instances": 1,
            "pid": 2976,
            "uid": 1000,
            "watches": 63
        },
        {
            "cmdline": "/usr/libexec/flatpak-session-helper",
            "instances": 1,
            "pid": 3225,
            "uid": 1000,
            "watches": 3
        },
        {
            "cmdline": "/usr/lib64/firefox/firefox",
            "instances": 2,
            "pid": 3317,
            "uid": 1000,
            "watches": 11
        },
        {
            "cmdline": "/usr/libexec/cgroupify",
            "instances": 1,
            "pid": 3345,
            "uid": 1000,
            "watches": 330
        },
        {
            "cmdline": "/usr/bin/plasma-browser-integration-host",
            "instances": 1,
            "pid": 3621,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/dolphin",
            "instances": 4,
            "pid": 9392,
            "uid": 1000,
            "watches": 15
        },
        {
            "cmdline": "/usr/bin/dolphin",
            "instances": 5,
            "pid": 12444,
            "uid": 1000,
            "watches": 18
        },
        {
            "cmdline": "/usr/libexec/kf5/kio_http_cache_cleaner",
            "instances": 1,
            "pid": 27079,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/home/raghu/store/blender-3.6.0-linux-x64/blender",
            "instances": 1,
            "pid": 28187,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/okular",
            "instances": 3,
            "pid": 50348,
            "uid": 1000,
            "watches": 3
        },
        {
            "cmdline": "/usr/bin/gwenview",
            "instances": 5,
            "pid": 52615,
            "uid": 1000,
            "watches": 7
        },
        {
            "cmdline": "/usr/bin/speedcrunch",
            "instances": 1,
            "pid": 56347,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/gwenview",
            "instances": 5,
            "pid": 62302,
            "uid": 1000,
            "watches": 7
        },
        {
            "cmdline": "inkscape",
            "instances": 3,
            "pid": 62694,
            "uid": 1000,
            "watches": 4
        },
        {
            "cmdline": "/usr/bin/gwenview",
            "instances": 5,
            "pid": 78363,
            "uid": 1000,
            "watches": 7
        },
        {
            "cmdline": "/usr/bin/systemsettings",
            "instances": 2,
            "pid": 78613,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/libexec/kf5/kioslave5",
            "instances": 3,
            "pid": 79248,
            "uid": 1000,
            "watches": 3
        },
        {
            "cmdline": "/usr/libexec/kf5/kioslave5",
            "instances": 2,
            "pid": 79249,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/usr/libexec/kf5/kioslave5",
            "instances": 2,
            "pid": 79259,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/usr/bin/gwenview",
            "instances": 5,
            "pid": 79377,
            "uid": 1000,
            "watches": 7
        },
        {
            "cmdline": "/usr/libexec/kf5/kioslave5",
            "instances": 3,
            "pid": 79391,
            "uid": 1000,
            "watches": 3
        },
        {
            "cmdline": "/usr/bin/gwenview",
            "instances": 5,
            "pid": 79404,
            "uid": 1000,
            "watches": 7
        },
        {
            "cmdline": "/usr/libexec/kf5/kioslave5",
            "instances": 3,
            "pid": 79418,
            "uid": 1000,
            "watches": 3
        },
        {
            "cmdline": "/usr/bin/konsole",
            "instances": 2,
            "pid": 79840,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/usr/bin/zsh",
            "instances": 1,
            "pid": 79856,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "kde-inotify-survey",
            "instances": 1,
            "pid": 79877,
            "uid": 1000,
            "watches": 1
        }
    ],
    "totals": {
        "instancePercent": 85,
        "instances": 109,
        "maxInstances": 128,
        "maxWatches": 524288,
        "watchPercent": 2,
        "watches": 11590
    }
}

I clicked on increase instanced button in the notification and the maxinstance is increased to 256 in the report.

An inotify instance monitors file system events, such as file creation and deletion. I’ve noticed there are multiple instances of Gwenview running, which create multiple inotify instances. This may be the main reason that triggers the ‘Inotify Instance Capacity Low’ notification. By increasing the value of maxInstances to 256, it should be less likely to reach the limit. I think you did it successfully.

First off, welcome to the community Raghavendra!

I’ve been receiving this alert too, also on Fedora 38, also running KDE (on Wayland in my case). I noted it in this post: Running out of file handles in pipewire?

In my case it appears that pipewire is running out of file handles, or is the most affected victim of the system being run out of file handles by something.

In my case, Firefox and Chrome are possibly implicated also.

If I run kde-inotify-survey then /usr/libexec/uresourced with 2092 watches is fingered as the entity with the most active inotify watches. There’s nothing untoward (IMHO) in the counts in the other entities, with single or double digit counts (max: 94 for systemd).

I’ve been experiencing problematic behavior - principally manifesting as problems with audio playback in YouTube etc. videos in Firefox and Chrome - since I updated to kernel 6.3.6; I’m now on 6.3.11 (3 system updates) and the behavior is still problematic.

Out of interest, what hardware are you running on? I’m experiencing these problems on a Dell XPS 15" laptop, with an i7-12700H processor.

Hey @icantremember I am running fedora on a self assembled computer. Here are the specifications

Operating System: Fedora Linux 38
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.10
Kernel Version: 6.3.11-200.fc38.x86_64 (64-bit)
Processors: 20 × 12th Gen Intel® Core™ i7-12700
Memory: 31.1 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 750 Ti/PCIe/SSE2

My config is very similar: processor, memory, GPU type, although my system is using the iGPU because Fedora won’t accept the Nvidia driver for the RTX 3050 that’s in the system.

However, two is hardly a definitive sample size.

Just as I’m typing this I’m informed that I’m now using 97% of the inotify resource instances - 125 out of 128 - albeit with 0% of watches. 128 seems awfully low, especially when maxWatches is set to half a million.

This script - https://github.com/fatso83/dotfiles/blob/master/utils/scripts/inotify-consumers - shows that on my machine the top 5 consumers are:

   INOTIFY   INSTANCES
   WATCHES      PER   
    COUNT     PROCESS   PID USER         COMMAND
------------------------------------------------------------
    2156         1       10155 lionel     /usr/libexec/uresourced --user
     357         1       12684 lionel     /usr/libexec/cgroupify app-firefox-32267413eba84121afbbd2db9c634fe9.scope
     100         3        9941 lionel     /usr/lib/systemd/systemd --user
      56         3       10158 lionel     /usr/libexec/baloo_file
      49         3       10301 lionel     /usr/bin/kded5

Instances per process is uniformly low single digits (< 5)

I am also getting this notification.

Sometime after upgrading to F37 at the end of June, I have started getting “Inotify Watch Capacity Low” messages after having left the system running for several days. Two processes have consumed nearly the entire 500,000 watches allocated by default. Is there a watch leak or are these processes actually watching that many files?

INOTIFY INSTANCES
WATCHES PER
COUNT PROCESS PID USER COMMAND

291870 1 5936 linush /usr/libexec/cgroupify app-firefox-ac7e05eb03f14b7886d26c1fb912ea02.scope
184359 1 5027 linush /usr/libexec/uresourced --user
140 3 4669 linush /usr/lib/systemd/systemd --user
59 1 5279 linush /usr/libexec/xdg-desktop-portal-gtk
59 1 5081 linush /usr/libexec/xdg-desktop-portal-gnome
56 3 5084 linush /usr/bin/kded5
30 1 175364 linush /usr/libexec/gvfsd-trash --spawner :1.5 /org/gtk/gvfs/exec_spaw/0
21 3 5160 linush /usr/bin/plasmashell --no-respawn
15 3 5916 linush /usr/lib64/firefox/firefox --sm-client-id 101ac1a7d110f000164462669000000151010007
10 4 115329 linush /usr/lib/virtualbox/VirtualBox
7 3 115351 linush /usr/lib/virtualbox/VBoxSVC --auto-shutdown
4 4 5038 linush /usr/bin/wireplumber
4 1 5113 linush /usr/libexec/kactivitymanagerd
3 2 5189 linush /usr/libexec/org_kde_powerdevil
3 1 4717 linush /usr/bin/dbus-broker-launch --scope user
2 2 25168 linush /usr/bin/konsole --workdir /home/linush
2 2 174856 linush /usr/bin/konsole --workdir /home/linush
2 1 5506 linush /usr/libexec/evolution-source-registry
2 1 5441 linush /usr/libexec/DiscoverNotifier
1 1
1 1
1 1 977689 linush /bin/bash /home/linush/bin/inotify-consumers
1 1 974367 linush /usr/bin/gnome-calculator
1 1 6166 linush /usr/bin/konsole -session 101ac1a7d110f000164705063900000029680067_1647198226_793114
1 1 5574 linush /usr/libexec/evolution-addressbook-factory
1 1 5559 linush /usr/libexec/evolution-calendar-factory
1 1 5532 linush /usr/libexec/goa-daemon
1 1 5387 linush /usr/bin/python3 -Es /usr/bin/seapplet
1 1 5364 linush /usr/libexec/evolution-data-server/evolution-alarm-notify
1 1 5316 linush /usr/bin/dbus-broker-launch --config-file=/usr/share/defaults/at-spi2/accessibility.conf --scope user
1 1 5186 linush /usr/bin/gmenudbusmenuproxy
1 1 5036 linush /usr/libexec/xdg-desktop-portal
1 1 4688 linush /usr/bin/kwalletd5 --pam-login 12 13
1 1 25179 linush /bin/bash
1 1 175359 linush /usr/libexec/gvfs-afc-volume-monitor
1 1 175354 linush /usr/libexec/gvfs-udisks2-volume-monitor
1 1 174867 linush /bin/bash
1 1 115345 linush /usr/lib/virtualbox/VBoxXPCOMIPCD

476667 WATCHES TOTAL COUNT

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

INSTANCES USER


55 linush
2

Please, when posting formatted text from your screen use the preformatted text tags with the </> button on the tool bar. Note the major difference in readability with the way you posted it and the below where I added those tags to what you posted.

Maintaining the formatting helps us to read what is posted and makes things easier for everyone.

   INOTIFY   INSTANCES
   WATCHES      PER   
    COUNT     PROCESS   PID USER         COMMAND
------------------------------------------------------------
  291870         1        5936 linush      /usr/libexec/cgroupify app-firefox-ac7e05eb03f14b7886d26c1fb912ea02.scope
  184359         1        5027 linush      /usr/libexec/uresourced --user
     140         3        4669 linush      /usr/lib/systemd/systemd --user
      59         1        5279 linush      /usr/libexec/xdg-desktop-portal-gtk
      59         1        5081 linush      /usr/libexec/xdg-desktop-portal-gnome
      56         3        5084 linush      /usr/bin/kded5
      30         1      175364 linush      /usr/libexec/gvfsd-trash --spawner :1.5 /org/gtk/gvfs/exec_spaw/0
      21         3        5160 linush      /usr/bin/plasmashell --no-respawn
      15         3        5916 linush      /usr/lib64/firefox/firefox --sm-client-id 101ac1a7d110f000164462669000000151010007
      10         4      115329 linush      /usr/lib/virtualbox/VirtualBox
       7         3      115351 linush      /usr/lib/virtualbox/VBoxSVC --auto-shutdown
       4         4        5038 linush      /usr/bin/wireplumber
       4         1        5113 linush      /usr/libexec/kactivitymanagerd
       3         2        5189 linush      /usr/libexec/org_kde_powerdevil
       3         1        4717 linush      /usr/bin/dbus-broker-launch --scope user
       2         2       25168 linush      /usr/bin/konsole --workdir /home/linush
       2         2      174856 linush      /usr/bin/konsole --workdir /home/linush
       2         1        5506 linush      /usr/libexec/evolution-source-registry
       2         1        5441 linush      /usr/libexec/DiscoverNotifier
       1         1     
       1         1     
       1         1      977689 linush      /bin/bash /home/linush/bin/inotify-consumers
       1         1      974367 linush      /usr/bin/gnome-calculator
       1         1        6166 linush      /usr/bin/konsole -session 101ac1a7d110f000164705063900000029680067_1647198226_793114
       1         1        5574 linush      /usr/libexec/evolution-addressbook-factory
       1         1        5559 linush      /usr/libexec/evolution-calendar-factory
       1         1        5532 linush      /usr/libexec/goa-daemon
       1         1        5387 linush      /usr/bin/python3 -Es /usr/bin/seapplet
       1         1        5364 linush      /usr/libexec/evolution-data-server/evolution-alarm-notify
       1         1        5316 linush      /usr/bin/dbus-broker-launch --config-file=/usr/share/defaults/at-spi2/accessibility.conf --scope user
       1         1        5186 linush      /usr/bin/gmenudbusmenuproxy
       1         1        5036 linush      /usr/libexec/xdg-desktop-portal
       1         1        4688 linush      /usr/bin/kwalletd5 --pam-login 12 13
       1         1       25179 linush      /bin/bash
       1         1      175359 linush      /usr/libexec/gvfs-afc-volume-monitor
       1         1      175354 linush      /usr/libexec/gvfs-udisks2-volume-monitor
       1         1      174867 linush      /bin/bash
       1         1      115345 linush      /usr/lib/virtualbox/VBoxXPCOMIPCD

  476667  WATCHES TOTAL COUNT

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

INSTANCES    USER
-----------  ------------------
55           linush
2

Way more than half of the total there is on firefox (the first line), and nearly as many on uresourced so those two are providing 476249 of the total of 476667 .
What are you doing with firefox? Is it running for several days at a time? or closed frequently?

This machine runs 24 hours/day. Firefox typically only gets restarted when I boot the machine.

I’m also getting frequent entries in /var/log/messages about moving a pid into a new cgroup, and also complaining it could not add inotify watch.

Does Firefox keep so many files open?