Inotify instance limit for user exceeded, disabling.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Inotify instance limit for user exceeded, disabling.

Anders-19
Hi.

What does the warning "Inotify instance limit for user exceeded,
disabling." mean, and how do I get rid of it? I assume that I have to
change a limit somewhere?


Regards,
Anders.


Reply | Threaded
Open this post in threaded view
|

Re: Inotify instance limit for user exceeded, disabling.

Anders-19
Anders wrote:

> What does the warning "Inotify instance limit for user exceeded,
> disabling." mean, and how do I get rid of it? I assume that I have to
> change a limit somewhere?

Okay, reading the source has me think that this is an OS limit, so I
increased /proc/sys/fs/inotify/max_user_watches

Is there some way to calculate the upper limit? I imaging that each folder
in each connection needs a watch?


Cheers,
Anders.


Reply | Threaded
Open this post in threaded view
|

Re: Inotify instance limit for user exceeded, disabling.

Timo Sirainen
On May 5, 2008, at 11:15 AM, Anders wrote:

> Anders wrote:
>
>> What does the warning "Inotify instance limit for user exceeded,
>> disabling." mean, and how do I get rid of it? I assume that I have to
>> change a limit somewhere?
>
> Okay, reading the source has me think that this is an OS limit, so I
> increased /proc/sys/fs/inotify/max_user_watches

It says "instance limit", so I think the problem was  
max_user_instances instead.

> Is there some way to calculate the upper limit? I imaging that each  
> folder
> in each connection needs a watch?


They're added when IDLE command is run. Only one IDLE command can be  
running at a time per each connection. With maildir it listens for two  
directories. But there is only one instance created per process.

I guess you're using a single UID for all users? In that case the  
upper limits are:

  - max_user_instances = max_mail_processes setting
  - max_user_watches = max_mail_processes setting*2


PGP.sig (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Inotify instance limit for user exceeded, disabling.

Anders-19
Timo Sirainen wrote:

> They're added when IDLE command is run. Only one IDLE command can be
> running at a time per each connection. With maildir it listens for two
> directories. But there is only one instance created per process.

So each process has one inotify instance with just two watches. I was
under the impression that subfolders were also watched, but after testing
a bit, it seems to not be true. Only the SELECTed box is watched, right?

What confused me was that Thunderbird will show new messages in several
folders, but I guess it must be using multiple connections, one per open
folder.

Is there some way to have clients watch all folders? Server-side filtering
loses a bit of its value when you are not notified of the new mail.

> I guess you're using a single UID for all users? In that case the
> upper limits are:
>
>   - max_user_instances = max_mail_processes setting
>   - max_user_watches = max_mail_processes setting*2

I think max_user_watches is per instance, so should that just be 2?


Cheers,
Anders.


Reply | Threaded
Open this post in threaded view
|

Re: Inotify instance limit for user exceeded, disabling.

Timo Sirainen
On May 5, 2008, at 6:19 PM, Anders wrote:

> Timo Sirainen wrote:
>
>> They're added when IDLE command is run. Only one IDLE command can be
>> running at a time per each connection. With maildir it listens for  
>> two
>> directories. But there is only one instance created per process.
>
> So each process has one inotify instance with just two watches. I was
> under the impression that subfolders were also watched, but after  
> testing
> a bit, it seems to not be true. Only the SELECTed box is watched,  
> right?
Right.

> Is there some way to have clients watch all folders? Server-side  
> filtering
> loses a bit of its value when you are not notified of the new mail.

Clients typically issue STATUS command for all mailboxes every n  
minutes. I've been thinking about having Dovecot issue STATUS events  
automatically when mailboxes change, but last I checked most clients  
just ignored them. There exists also a draft of a new IMAP extension  
where clients can ask for those STATUS events from specified mailboxes.

>> I guess you're using a single UID for all users? In that case the
>> upper limits are:
>>
>>  - max_user_instances = max_mail_processes setting
>>  - max_user_watches = max_mail_processes setting*2
>
> I think max_user_watches is per instance, so should that just be 2?

So it seems.

PGP.sig (201 bytes) Download Attachment