[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Too many open files



On Fri, 2025-08-15 at 20:55 -0700, Ken Mankoff wrote:
> I'd like to report a bug but don't know what package, and reportbug
> says I should email this list. I'm running Debian Trixie KDE Wayland,
> and repeatedly seeing "Too many open files".
> 
> Two examples:
> 
> $ dolphin .
> kf.solid.backends.fstab: Failed to acquire watch file descriptor Too
> many open files
> 
> $ tail -f some_big_file
> tail: inotify cannot be used, reverting to polling: Too many open
> files

It sounds like both of these messages are related to 'inotify' (and/or
one of the other kernel APIs for watching for file changes like
'fanotify').

There are separate limits for that sort of file descriptors, which you
can find in e.g.:

   /proc/sys/fs/inotify/*
   /proc/sys/fs/fanotify/*

You can also read them using 'sysctl' like so:

   sysctl fs.inotify.max_user_instances

Or set them like so:

   sudo sysctl -w fs.inotify.max_user_instances=256

That sets the new limit temporarily until next boot (ideal for
testing).

If you want to set new limits permanently, the best way is to create a
new *.conf file (e.g. 'local.conf' or 'inotiy-limits.conf') in
'/etc/sysctl.d/' with lines like this:

   fs.inotify.max_user_instances = 256

You can also add comment lines starting with '#' in the file to
document what/why you are changing those.



-- 
Jan Claeys

(please don't CC me when replying to the list)


Reply to: