[Dovecot] Another "Too many files open" post
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.
Andy Cravens acravens@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
Channing wrote:
Andy Cravens acravens@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@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
I'm running Solaris 9 Sparc with Dovecot alpha 5 and using maildir format.. I noticed in the log file the following error:
We used to have this problem when we started using 1.0-stable. In the startup script, I issue the plimit command:
'start')
if [ -x $EXEC -a -f $CONF ]; then
echo "Starting Dovecot..."
$EXEC -c $CONF
sleep 2
plimit -n 8192,8192 cat /var/run/dovecot/master.pid
else
echo "Starting Dovecot failed."
fi
;;
The sleep is there sincs it takes a little while before the pid file appears.
-Remy
Remy Zandwijk wrote:
I'm running Solaris 9 Sparc with Dovecot alpha 5 and using maildir format.. I noticed in the log file the following error:
We used to have this problem when we started using 1.0-stable. In the startup script, I issue the plimit command:
Why not use a "unlimit" command instead, i.e.:
'start') if [ -x $EXEC -a -f $CONF ]; then echo "Starting Dovecot..." # We need mo' files ulimit -n 8192 $EXEC -c $CONF else echo "Starting Dovecot failed." fi ;;
?
I bumped into this too, with a limit of 64 (Solaris 7). Raising it, using aforementioned method, to 1024 solved the problem for me. Alpha5 is running smoothly, with outstanding performance.
Why not use a "unlimit" command instead, i.e.:
I'm not sure; I guess at the time we ran into this problem, we didn't want to shutdown Dovecot to investigate what was going on and how to fix it. plimit could be used while Dovecot was running. I cannot think of anything else :-)
-Remy
On Wed, 21 Dec 2005 08:52:32 +0100 Jeroen Scheerder wrote:
Remy Zandwijk wrote:
I'm running Solaris 9 Sparc with Dovecot alpha 5 and using maildir format.. I noticed in the log file the following error:
We used to have this problem when we started using 1.0-stable. In the startup script, I issue the plimit command:
Why not use a "unlimit" command instead, i.e.: [snip] I bumped into this too, with a limit of 64 (Solaris 7). Raising it, using aforementioned method, to 1024 solved the problem for me. Alpha5 is running smoothly, with outstanding performance.
ulimit sets the limit for a shell and plimit sets it for a process. The man pages talk all about them.
And setting it to 1024 is the default rlim_fd_max for Solaris (at least Solaris 8 and up). Whether or not that is going to work for you is going to depend on if you have more than 500 (or so) users using your system concurrently, given that my understanding is that in the current version each connection uses 2 fd's.
So, if you didn't want to reboot quite yet, you could use plimit to poke the process to use 1024, but if you're at a site like mine that would only work until everyone has had a chance to wander on in ;) Bumping /etc/system much higher and rebooting is really the only true fix for this (and is something I routinely do on all my servers for good measure).
-Jeff
--
Jeff Ballard ballard@engr.wisc.edu 608-265-5090 Unix Systems Manager, Computer-Aided Engineering Center
Andy, This sounds like a kernel parameter issue, not a dovecot.conf twiddle. My system supports 3000 users, and "ulimit -a" has no mention of "open files" at all. With maildir format, you would have a lot of open files (I use mbox).
My /etc/system has the following additions, which I put in when I first started using alpha3:
- double file descriptor limits for dovecot set rlim_fd_cur = 65536 set rlim_fd_max = 131072
I don't have any ulimit or plimit twiddles in my startup script, as others have suggested. Per their advice, use plimit or adb to adjust things until you can change /etc/system and reboot.
Jeff Earickson Colby College
On Tue, 20 Dec 2005, Andy Cravens wrote:
Date: Tue, 20 Dec 2005 16:59:08 -0700 From: Andy Cravens acravens@uen.org To: dovecot@dovecot.org Subject: [Dovecot] Another "Too many files open" post
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.
It's worth pointing out that /any/ system worth its salt has user limits...for # files, memory, stack size, etc, etc.....so this is a generic situation that could bite the sys admin on any system when users start using resources heavily. In IBM's AIX, the file that sets this is /etc/security/limits....and I believe it takes effect immediately when changed there or at least at the next user's login....there is a default stanza and then stanzas (optional) for each userid.....
Andy Cravens wrote:
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.
--
Stewart Dean, Unix System Admin, Henderson Computer Resources
Center of Bard College, Annandale-on-Hudson, New York 12504
sdean@bard.edu voice: 845-758-7475, fax: 845-758-7035
participants (8)
-
Andy Cravens
-
Channing
-
Chris Wakelin
-
Jeff A. Earickson
-
Jeff Ballard
-
Jeroen Scheerder
-
Remy Zandwijk
-
Stewart Dean