[Dovecot] Can`t get over 1024 processes

Tomáš Randa tomas at blueboard.cz
Mon Sep 17 18:58:12 EEST 2012


kern.maxprocperuid is maximum allowed user limit, But in standard it is 
set to maximum imho. And if dovecot checks limit why it did not 
increases it on FreeBSD? :( ? Hard limit 8192 on my box is much more.





Dne 17.09.12 17:45, Timo Sirainen napsal(a):
> On 17.9.2012, at 18.26, Timo Sirainen wrote:
>
>> It doesn't work like that with Dovecot. ulimit -u 8192 must be run just before dovecot binary is started. ulimits elsewhere are irrelevant.
>
> Although the strange thing is that Dovecot v2.1 is supposed to automatically increase this limit at startup. Maybe FreeBSD does work in a different way than Linux? The way Linux works (and Dovecot assumes things work) is:
>
> 1. dovecot master process starts, inheriting the ulimits from the shell that starts it
> 2. Dovecot checks the current limit and increases it if necessary
> 3. Forked child processes inherit the parent's ulimits
> 4. setuid(X) fails if UID X has reached the ulimit value (according the current process's ulimit - not some other value read from somewhere)
>
> There is no reading of X's ulimit value anywhere, it's the same for all Dovecot child processes. limits.conf and such are read and applied by PAM, which is done before 1 step.
>
> kern.maxprocperuid I guess means the upper allowed limit for the ulimit.
>




More information about the dovecot mailing list