On Sat, 10 May 2008, Gabor FUNK wrote:
We have run into the problem of uw-imap limit's of open files. I don't know whether it happens under "normal" uw-imap usage,
The answer to your question is that UW imapd does not encounter this problem. Each UW imapd session runs in its own process spawned by inetd, so normally it doesn't even get to 2-digit fd values, much less 1024.
but it does happen when uw-imap is used by apache->php5-> php5-imap, and "parent" has more than 1024 files opened, which can easily happen, eg. apache runs with 512+ virtualhosts with 2 log files (access/error log) each, etc. [apache et al have no problem opening larger number of files - they use system ulimit values]
I don't know much about running web servers, so the following comments may not be intelligent:
Is this all running in one process? If so, I'm surprised that it runs well at all. The c-client library uses blocking I/O for TCP, and the fact that you encounter this indicates that you are making TCP (IMAP, POP3, NNTP, SMTP) connections. I can't imagine having 512 virtual hosts if any one can block everything. Or does threading take care of that?
Even with threading, I can't imagine a single process running that many virtual hosts.
If this is running in separate processes, do all the processes need to have all those open file descriptors? I see no reason why a virtual host needs to access some other virtual host's access and error logs.
Of course if there are select()-s then it is a deeper "problem"...
The c-client library uses select(). Some of the systems supported by c-client do not have poll().
Fortunately, there are only a few of these calls; there are 5 select() calls in tcp_unix.c and 2 select() calls in ssl_unix.c. So I guess that it would not difficult for you (or some programmer working for you) to change these.
-- Mark -- http://staff.washington.edu/mrc Science does not emerge from voting, party politics, or public debate. Si vis pacem, para bellum. _______________________________________________ Imap-uw mailing list [email protected] https://mailman1.u.washington.edu/mailman/listinfo/imap-uw
