[Dovecot] dovecot: pipe() failed: Too many open files

Mario Antonio support at webjogger.net
Sat Dec 19 01:12:59 EET 2009


JW wrote:
> On Friday 18 December 2009 16:00:48 Timo Sirainen wrote:
>   
>> On Dec 18, 2009, at 4:47 PM, JW wrote:
>>     
>>> I've researched this problem a number of times, usually I see suggestions
>>> to increase ulimit.
>>>
>>> I've done this a number of times, all the way up to:
>>>
>>> ulimit -n 8192
>>>
>>> I've put that in the init script right above the daemon start line.
>>>       
>> What exactly is the "daemon start line"
>>     
>
> I'm sorry, I forgot to specify that I was using Debian Linux:
>
>
> case "$1" in
>   start)
>     if grep protocols /etc/dovecot/dovecot.conf | sed 's/#.*$//' | tr -d '"' | 
> \
>     egrep -q '[^#]*(\bpop3s?\b|\bimaps?\b)';
>     then
>       if [ -x /usr/lib/dovecot/imap-login -a -x /usr/lib/dovecot/imap ] \
>         || [ -x /usr/lib/dovecot/pop3-login -a -x /usr/lib/dovecot/pop3 ];
>       then
>         echo -n "Starting $DESC: $NAME"
>         ulimit -n 8192
>         start-stop-daemon --start --quiet --oknodo --exec $DAEMON
>         echo "."
>       fi
>     fi
>     ;;
>   stop)
>     echo -n "Stopping $DESC: $NAME "
>     start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
>     echo "."
>     ;;
>
>
>   
>> ? Many Linux distros override ulimit 
>> in their internal scripts. If you're using Linux, you could check if
>> dovecot process really has 8192 limit:
>>
>> cat /proc/`pidof dovecot`/limits | grep 'Max open'
>>     
>
>
> I've seen this suggestion on the web a few times, but there's no such 
> directory, /proc/`pidof dovecot`/limits or /proc/*/limits for that matter
>
> 	pidof dovecot
>
> shows the pid for:
>
> 	/usr/sbin/dovecot
>
> I've tried "grep -i max" and grep -i open in the /proc/$pid/* directory for 
> every pid of every dovecot process on the system, none of the files in there 
> contain either word.
>
> mail:/var/log# ps auxw | grep dove
> root     23299  0.0  0.0   1948   648 ?        Ss   00:41   
> 0:07 /usr/sbin/dovecot
> root     23300  0.0  0.2   8752  2700 ?        S    00:41   0:05 dovecot-auth
>
> mail:/var/log# ls /proc/23299
> attr  cmdline  cwd      exe  maps  mounts      oom_adj    root   stat   status  
> wchan
> auxv  cpuset   environ  fd   mem   mountstats  oom_score  smaps  statm  task
>
>
> Is there a different place I should put the ulimit?
>
> 	JW
>
>   
You could try:
/etc/security/limits.conf



your_dovecot_user soft nofile 524288
your_dovecot_user hard nofile 524288

Not sure if instead of your_dovecot_user, you should increase the limits 
for the root user .... ??

Regards,
Mario Antonio



More information about the dovecot mailing list