This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Baloo File Indexer has reached the inotify folder watch limi

Tags: None
(comma "," separated)
jehoshua
Registered Member
Posts
100
Karma
0
OS
Had a boot error today and the log file had a lot of these ..

baloo_file[1324]: KDE Baloo File Indexer has reached the inotify folder watch limit. File changes will be ignored.


I found some documents related to this at https://loggedfixes.com/tech/software/u ... e-ignored/ and https://askubuntu.com/questions/1137733 ... untu-19-04

Is the answer supplied by the second one at AskUbuntu the correct method to fix this please ?


Currently running Kubuntu 22.04, Plasma 5.24.4, Frameworks 5.92.0, Qt 5.15.3, kernel 5.15.0-46-generic (64-bit), GeForce 840M Graphics
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS
Hi!

There are some things you can do. Increasing the maximum files watched is one solution, the other could be to inspect the current indexing to know why there already are that many watches. Perhaps you need more filtering, have recursive folder-structure or included a folder with a lot of changes in it. See
Code: Select all
balooctl config ls OPTION
for your current settings.

If you need to have a lot of files opened that are part of the indexing, increasing would be the solution. What is the current setting in your installation?
Code: Select all
sysctl fs.inotify.max_user_watches
jehoshua
Registered Member
Posts
100
Karma
0
OS
Thanks for your reply.

koffeinfriedhof wrote:There are some things you can do. Increasing the maximum files watched is one solution, the other could be to inspect the current indexing to know why there already are that many watches. Perhaps you need more filtering, have recursive folder-structure or included a folder with a lot of changes in it.


I don't really need a lot of files open, or cannot perceive why there would be that many watches. There is still a number of akonadi based packages installed, despite the fact that I don't use KMail or any of the PIM side of KDE. Whether they are causing Baloo indexing to be inflated or not ? Those packages are:

akonadi-backend-mysql
akonadi-server
kdepim-runtime
libkf5akonadi* libraries

Here is the output of a few commands re Baloo

Code: Select all
balooctl status


Baloo File Indexer is running
Indexer state: Idle
Total files indexed: 297,935
Files waiting for content indexing: 0
Files failed to index: 0
Current size of index is 430.94 MiB


Code: Select all
balooctl config ls OPTION


Config parameter could not be found


Code: Select all
balooctl config ls


The following configuration options may be listed:

hidden Controls if Baloo indexes hidden files and folders
contentIndexing Controls if Baloo indexes file content
includeFolders The list of folders which Baloo indexes
excludeFolders The list of folders which Baloo will never index
excludeFilters The list of filters which are used to exclude files
excludeMimetypes The list of mimetypes which are used to exclude files


Code: Select all
sysctl fs.inotify.max_user_watches


fs.inotify.max_user_watches = 8192


Currently running Kubuntu 22.04, Plasma 5.24.4, Frameworks 5.92.0, Qt 5.15.3, kernel 5.15.0-46-generic (64-bit), GeForce 840M Graphics
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS
jehoshua wrote:I don't really need a lot of files open, or cannot perceive why there would be that many watches.

Well, inotify is a kernel spec, that allows to watch files (and folders) for changes. The KDE Environment (and some applications) uses this to watch configuration file changes and stuff like this. Being aware of the dependencies of each package, you could uninstall the things you do not need to keep your system clean. Akonadi is the "Database-Backend" of KDE, so I would not uninstall it if you're using any application relying on it (KDE PIM stuff, KTimer, some Plasmoids…).
Config parameter could not be found

for OPTION you can place the options listed with balooctl config ls, e.g.
Code: Select all
balooctl config ls hidden

fs.inotify.max_user_watches = 8192
[/quote]
This could be to low. You may set it up to a higher value using sysctl --write variable=value, e.g.
Code: Select all
sysctl -w fs.inotify.max_user_watches=524288
You need root-permissions to do this.
jehoshua
Registered Member
Posts
100
Karma
0
OS
koffeinfriedhof wrote:Well, inotify is a kernel spec, that allows to watch files (and folders) for changes. The KDE Environment (and some applications) uses this to watch configuration file changes and stuff like this. Being aware of the dependencies of each package, you could uninstall the things you do not need to keep your system clean. Akonadi is the "Database-Backend" of KDE, so I would not uninstall it if you're using any application relying on it (KDE PIM stuff, KTimer, some Plasmoids…).


Okay, thanks for explaining that. So it was a system level limitation on files watched that cause Baloo to issue the error

koffeinfriedhof wrote:This could be to low. You may set it up to a higher value using sysctl --write variable=value, e.g.
Code: Select all
sysctl -w fs.inotify.max_user_watches=524288
You need root-permissions to do this.


Thanks, I've set the value higher now.


Currently running Kubuntu 22.04, Plasma 5.24.4, Frameworks 5.92.0, Qt 5.15.3, kernel 5.15.0-46-generic (64-bit), GeForce 840M Graphics


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]