Skip to content

Commit

Permalink
doc: update inotify assertion to provide more accurate feedback (#37111)
Browse files Browse the repository at this point in the history
If inotify fails to watch additional file descriptors the solution is usually a combination of setting
max_user_instances as well as max_user_watches (from personal experience). In addition, it seems like the original message had `user` and `inotify` inverted by accident?
Risk Level: low
Testing: -
Docs Changes: -
Release Notes: -
Platform Specific Features: -

Signed-off-by: Martijn Swaagman <[email protected]>
  • Loading branch information
Swaagie authored Nov 16, 2024
1 parent 80eae33 commit 79d14e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/common/filesystem/inotify/watcher_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ namespace Filesystem {
WatcherImpl::WatcherImpl(Event::Dispatcher& dispatcher, Filesystem::Instance& file_system)
: file_system_(file_system) {
inotify_fd_ = inotify_init1(IN_NONBLOCK);
RELEASE_ASSERT(inotify_fd_ >= 0,
"Consider increasing value of user.max_inotify_watches via sysctl");
RELEASE_ASSERT(inotify_fd_ >= 0, "Consider increasing value of fs.inotify.max_user_watches "
"and/or fs.inotify.max_user_instances via sysctl");
inotify_event_ = dispatcher.createFileEvent(
inotify_fd_,
[this](uint32_t events) {
Expand Down

0 comments on commit 79d14e3

Please sign in to comment.