[Dovecot] Another "Too many files open" post

Chris Wakelin c.d.wakelin at reading.ac.uk
Wed Dec 21 02:24:05 EET 2005


Channing wrote:
> Andy Cravens <acravens at uen.org>:
> 
>> I'm running Solaris 9 Sparc with Dovecot alpha 5 and using maildir 
>> format..  I noticed in the log file the following error:
>>
>> dovecot: Dec 20 15:54:18 Error: imap(xxxxxxxx): 
>> open(/export/home/xxxxxxxx/mail/.Sent 
>> Messages/cur/1135013649.002916.mbox:2,Sab) failed: Too many open files
>>
>> I called the guy and asked him what he was doing... synching his 
>> folders.  It hung for a while but finally finished.
>>
>> I searched the archives and found some related info from Jeff Ballard:
>>
>> >Actually on Solaris 9 you want to put something like this in 
>> >/etc/system:
>> >
>> >set rlim_fd_cur = 32768
>> >set rlim_fd_max = 65536
>> >
>> >That sets the current fd's to 32k and max to 64k.  Unfortunately, to 
>> >take effect you'll need to reboot.  After the reboot, ulimit -a 
>> should >show that nofiles(descriptors) is 32768.
>> >
>> >-Jeff
>>
>> And I found this from Jeff Earickson:
>>
>> >I ran into this problem with alpha4 on Solaris 9.  I doubled the
>> >following dovecot settings:
>> >
>> >login_max_processes_count = 256 (was 128)
>> >login_max_logging_users = 512 (was 256)
>> >
>> >and the problem went away.  I carried these numbers forward intoalpha5,
>> >and it has been working fine.
>>
>> I changed my /etc/system file but have not rebooted yet.  Also, on 
>> Jeff Earickson's post, I looked at my dovecot.conf settings and 
>> they're basically default which means everything in the "Login 
>> processes" section is commented out.
>>
>> I have 10 users on this system and will hold off migrating any more 
>> until I can resolve this problem.  By the way, my "ulimit -a" shows 
>> "open files" at 256 which seems low.
>>
>> # ulimit -a
>> core file size (blocks)     0
>> data seg size (kbytes)      unlimited
>> file size (blocks)          unlimited
>> open files                  256
>> pipe size (512 bytes)       10
>> stack size (kbytes)         8192
>> cpu time (seconds)          unlimited
>> max user processes          29995
>> virtual memory (kbytes)     unlimited
>>
>> Any advice would be appreciated.  I can't reboot for a few more days.
>>
>>
> I'm not in front of a Solaris box right now, but if you don't want to 
> reboot, look at adb(1).  Here is a Sun doc: 
> http://docs.sun.com/app/docs/doc/816-0607/6m735r5f2?a=view
> 
> Hope this helps,
> Channing
> 
>  

Or look at plimit :-

e.g.

# plimit 23980
23980:  /opt/RDGdovect/sbin/dovecot-ssl -c 
/opt/RDGdovect/etc/dovecot-ssl.conf
    resource              current         maximum
   time(seconds)         unlimited       unlimited
   file(blocks)          unlimited       unlimited
   data(kbytes)          unlimited       unlimited
   stack(kbytes)         8192            unlimited
   coredump(blocks)      unlimited       unlimited
   nofiles(descriptors)  2048            2048
   vmemory(kbytes)       unlimited       unlimited

"plimit -n 2048 <pid>" ought to work

Best Wishes,
Chris

-- 
--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-
Christopher Wakelin,                           c.d.wakelin at reading.ac.uk
IT Services Centre, The University of Reading,  Tel: +44 (0)118 378 8439
Whiteknights, Reading, RG6 2AF, UK              Fax: +44 (0)118 975 3094


More information about the dovecot mailing list