Re: Problem using incron for a large amount of folder.

From: Lukas Jelinek <lukas_at_aiken.cz>
Date: Tue, 14 Dec 2010 01:27:05 +0100

Hello,
it looks like exceeding the watch limit in the kernel. The default value
is 8192. It means any program can't watch more files per file descriptor
than this number. incron uses one file descriptor per user table. Thus
it can watch only the specified number of files for each user. Please
try to make these steps:
1. Check the /proc/sys/fs/inotify/max_user_watches file (e.g. "cat
/proc/sys/fs/inotify/max_user_watches").
2. If the content is "8192" try to increase this number (using root's
privileges of course). Something like "echo 16384 >
/proc/sys/fs/inotify/max_user_watches" should be good.
3. Check what how does it work now. If it succeds consider to increase
this value permanently some way. But remember that each inotify watch
consume some physical memory (no problem in most cases - it is on
older/embedded/etc. machines important however).
4. If it fails please find and send me all lines from the system log
having "incron" as the originating program and "error" as its severity.

Regards,
Lukas

> Hello,
>
> i'm currently working on a small app. It indexes folders (and their
> content, recursively) in a database. In order to keep my db up to
> date, i use incron to seek for any change inside the indexed folders.
>
> To do so, i fill the incron table ("/var/spool/incron/root") during
> the indexation. One line for each folder indexed. The filling is done
> "manually" (i use a php script to do so), without using incrontab. Any
> add/remove/change of a file/folder is detected by incron and will call
> a "up-to-date" script.
>
> It works quite well, but i noticed that, when i exceed a certain
> amount of folders (and so lines in the table), all the folders after
> this "line" aren't watched by incron.
> This amount is not constant. Last day it was the 8171th line, today is
> the 8139th line. Indexing this number of file (and finding the exact
> line too) takes time so i haven't so many data on this problem.
>
> From last day to today i also change the "content" of each line (the
> path of the script called have change, becoming a little longer). So
> the relevant thing may be the weight of the file (1.9 mo) more than
> the number of lines.
>
> Any hints ?
>
> (english is not my native language, please forgive the mistakes i
> could have done).
>

-- 
*Ing. Lukás( Jelínek*
/jednatel/
*AIKEN s.r.o.*
provozovna: Lorecká 465, 284 01 Kutná Hora
sídlo: Jakubská 3, 284 01 Kutná Hora
tel. 312 312 413
mobil 606 362 315
fax 910 807 336
e-mail: aiken_at_aiken.cz <mailto:aiken_at_aiken.cz>
Received on Tue Jun 05 2012 - 22:14:21 CEST

This archive was generated by hypermail 2.2.0 : Tue Jun 05 2012 - 22:14:21 CEST