> 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.
At http://bugs.debian.org:80/cgi-bin/bugreport.cgi?bug=478193
there are more details, so yes, pop3 connections  is being opened
(
    imap_open() [<a href='function.imap-open'>function.imap-open</a>]:
    Couldn't open stream {127.0.0.1:110/pop3/notls
)

> I can't imagine having 512 virtual hosts if any one can block everything.
> Or does threading take care of that?
I assume they just not limited by/to fd_setsize (not use select()).

> 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.
See below*** a snippet of a process list, where there are more than 8192
"files" are opened for one process (#3009). To be honest, I don't know
why apache holds open _every_ log files, for _every_ separate processes
(as there are more), but since this works, I don't really care (nor have
noticed earlier).
So, this works without any (other) problems though we host numerous
other services and php modules (mysql, curl, zend, gd, hash, etc.),
nothing else affected, problem only exhibits when uw-imap client library
is being called through php5-imap.


>> 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.

Since this is not (only) _my_ problem, but many other people's as well
(see google results) I think it would be the best to "fix" at upstream level -
if possible...


***process list of a test system [note 8211 FDs used]:

COMMAND    PID        USER   FD      TYPE     DEVICE     SIZE       NODE NAME
...
apache2   3009        root  cwd       DIR        9,1     4096          2 /
apache2   3009        root  rtd       DIR        9,1     4096          2 /
apache2   3009        root  txt       REG        9,1   344824    1947556 
/usr/sbin/apache2
apache2   3009        root  DEL       REG        0,7              146032 
/dev/zero
apache2   3009        root  mem       REG        9,1    85980    2044869 
/usr/lib/php5/20060613+lfs/pdo.so
apache2   3009        root  mem       REG        9,1    37600    1357561 
/lib/libpam.so.0.81.6
apache2   3009        root  mem       REG        9,1  1056180    2044590 
/usr/lib/libc-client.so.2007.0
apache2   3009        root  mem       REG        9,1    93868    2044279 
/usr/lib/php5/20060613+lfs/imap.so
apache2   3009        root  DEL       REG        0,7              146034 
/dev/zero
apache2   3009        root  mem       REG        9,1    38412    1525763 
/lib/i686/cmov/libnss_files-2.7.so
apache2   3009        root  mem       REG        9,1    34352    1525765 
/lib/i686/cmov/libnss_nis-2.7.so
apache2   3009        root  mem       REG        9,1    30436    1525761 
/lib/i686/cmov/libnss_compat-2.7.so
apache2   3009        root  mem       REG        9,1   151564    2045198 
/usr/lib/apache2/modules/mod_ssl.so
apache2   3009        root  mem       REG        9,1  1166856    2044532 
/usr/lib/libxml2.so.2.6.31
apache2   3009        root  mem       REG        9,1    83708    1525760 
/lib/i686/cmov/libnsl-2.7.so
apache2   3009        root  mem       REG        9,1   149328    1525758 
/lib/i686/cmov/libm-2.7.so
apache2   3009        root  mem       REG        9,1    66276    1357539 
/lib/libbz2.so.1.0.4
apache2   3009        root  mem       REG        9,1    18364    2045751 
/usr/lib/apache2/modules/mod_status.so
apache2   3009        root  mem       REG        9,1     8420    2044658 
/usr/lib/apache2/modules/mod_setenvif.so
apache2   3009        root  mem       REG        9,1  5662832    2044293 
/usr/lib/apache2/modules/libphp5.so
apache2   3009        root  mem       REG        9,1    27112    2045213 
/usr/lib/apache2/modules/mod_negotiation.so
apache2   3009        root  mem       REG        9,1    13472    2045758 
/usr/lib/apache2/modules/mod_mime.so
apache2   3009        root  mem       REG        9,1     4960    2045777 
/usr/lib/apache2/modules/mod_env.so
apache2   3009        root  mem       REG        9,1     5856    2045775 
/usr/lib/apache2/modules/mod_dir.so
apache2   3009        root  mem       REG        9,1    19936    2045771 
/usr/lib/apache2/modules/mod_cgi.so
apache2   3009        root  mem       REG        9,1    29512    2045762 
/usr/lib/apache2/modules/mod_autoindex.so
apache2   3009        root  mem       REG        9,1     4488    2045739 
/usr/lib/apache2/modules/mod_authz_user.so
apache2   3009        root  mem       REG        9,1     6312    2045741 
/usr/lib/apache2/modules/mod_authz_host.so
apache2   3009        root  mem       REG        9,1     6988    2045767 
/usr/lib/apache2/modules/mod_authz_groupfile.so
apache2   3009        root  mem       REG        9,1     3884    2045780 
/usr/lib/apache2/modules/mod_authz_default.so
apache2   3009        root  mem       REG        9,1     5000    2044665 
/usr/lib/apache2/modules/mod_authn_file.so
apache2   3009        root  mem       REG        9,1     5564    1357558 
/lib/libkeyutils-1.2.so
apache2   3009        root  mem       REG        9,1    27588    2044641 
/usr/lib/libkrb5support.so.0.1
apache2   3009        root  mem       REG        9,1   143296    2044632 
/usr/lib/libk5crypto.so.3.1
apache2   3009        root  mem       REG        9,1   421860    2044894 
/usr/lib/libgcrypt.so.11.4.3
apache2   3009        root  mem       REG        9,1    81012    2044140 
/usr/lib/libz.so.1.2.3.3
apache2   3009        root  mem       REG        9,1    11556    2044288 
/usr/lib/libgpg-error.so.0.3.0
apache2   3009        root  mem       REG        9,1    59484    2044249 
/usr/lib/libtasn1.so.3.0.14
apache2   3009        root  mem       REG        9,1   167960    2044628 
/usr/lib/libgssapi_krb5.so.2.2
apache2   3009        root  mem       REG        9,1     7364    1357583 
/lib/libcom_err.so.2.1
apache2   3009        root  mem       REG        9,1   582740    2044640 
/usr/lib/libkrb5.so.3.3
apache2   3009        root  mem       REG        9,1  1338692    2060362 
/usr/lib/i686/cmov/libcrypto.so.0.9.8
apache2   3009        root  mem       REG        9,1   278532    2060377 
/usr/lib/i686/cmov/libssl.so.0.9.8
apache2   3009        root  mem       REG        9,1   491276    2044733 
/usr/lib/libgnutls.so.26.1.3
apache2   3009        root  mem       REG        9,1    89352    2044638 
/usr/lib/libsasl2.so.2.0.22
apache2   3009        root  mem       REG        9,1    67408    1525769 
/lib/i686/cmov/libresolv-2.7.so
apache2   3009        root  mem       REG        9,1     9684    1525757 
/lib/i686/cmov/libdl-2.7.so
apache2   3009        root  mem       REG        9,1    38300    1525756 
/lib/i686/cmov/libcrypt-2.7.so
apache2   3009        root  mem       REG        9,1    30624    1525770 
/lib/i686/cmov/librt-2.7.so
apache2   3009        root  mem       REG        9,1    12652    1357615 
/lib/libuuid.so.1.2
apache2   3009        root  mem       REG        9,1   126508    2044464 
/usr/lib/libexpat.so.1.0.0
apache2   3009        root  mem       REG        9,1   356132    2044171 
/usr/lib/libsqlite3.so.0.8.6
apache2   3009        root  mem       REG        9,1   123628    2044172 
/usr/lib/libpq.so.5.1
apache2   3009        root  mem       REG        9,1  1227876    2044259 
/usr/lib/libdb-4.6.so
apache2   3009        root  mem       REG        9,1    51236    2044315 
/usr/lib/liblber-2.4.so.2.0.3
apache2   3009        root  mem       REG        9,1   255780    2044323 
/usr/lib/libldap_r-2.4.so.2.0.3
apache2   3009        root  mem       REG        9,1  1360292    1525754 
/lib/i686/cmov/libc-2.7.so
apache2   3009        root  mem       REG        9,1   112354    1525768 
/lib/i686/cmov/libpthread-2.7.so
apache2   3009        root  mem       REG        9,1   143892    2044499 
/usr/lib/libapr-1.so.0.2.11
apache2   3009        root  mem       REG        9,1   105980    2045048 
/usr/lib/libaprutil-1.so.0.2.11
apache2   3009        root  mem       REG        9,1   154704    2044392 
/usr/lib/libpcre.so.3.12.1
apache2   3009        root  mem       REG        9,1     6344    2045761 
/usr/lib/apache2/modules/mod_auth_basic.so
apache2   3009        root  mem       REG        9,1     9156    2045757 
/usr/lib/apache2/modules/mod_alias.so
apache2   3009        root  mem       REG        9,1     5860    2045743 
/usr/lib/apache2/modules/mod_actions.so
apache2   3009        root  mem       REG        9,1   109152    1357534 
/lib/ld-2.7.so
apache2   3009        root    0r      CHR        1,3                1962 
/dev/null
apache2   3009        root    1w      CHR        1,3                1962 
/dev/null
apache2   3009        root    2w      REG        9,1   482915     245290 
/var/log/apache2/error.log
apache2   3009        root    3u     IPv4     131691                 TCP 
admin.huweb.hu:www (LISTEN)
apache2   3009        root    4r     FIFO        0,5              146024 pipe
apache2   3009        root    5w     FIFO        0,5              146024 pipe
apache2   3009        root    6w      REG        9,1        0     247524 
/var/log/apache2/x-4100.huweb.hu.error
apache2   3009        root    7w     FIFO        0,5               10514 pipe
apache2   3009        root    8w      REG        9,1        0     247525 
/var/log/apache2/x-4099.huweb.hu.error
apache2   3009        root    9w      REG        9,1        0     247526 
/var/log/apache2/x-4098.huweb.hu.error
apache2   3009        root   10w      REG        9,1        0     247527 
/var/log/apache2/x-4097.huweb.hu.error
apache2   3009        root   11w      REG        9,1        0     247528 
/var/log/apache2/x-4096.huweb.hu.error
apache2   3009        root   12w      REG        9,1        0     247529 
/var/log/apache2/x-4095.huweb.hu.error
apache2   3009        root   13w      REG        9,1        0     247530 
/var/log/apache2/x-4094.huweb.hu.error
apache2   3009        root   14w      REG        9,1        0     247531 
/var/log/apache2/x-4093.huweb.hu.error
apache2   3009        root   15w      REG        9,1        0     247532 
/var/log/apache2/x-4092.huweb.hu.error
...
apache2   3009        root 4097w      REG        9,1        0     246461 
/var/log/apache2/x-0010.huweb.hu.error
apache2   3009        root 4098w      REG        9,1        0     246462 
/var/log/apache2/x-0009.huweb.hu.error
apache2   3009        root 4099w      REG        9,1        0     246463 
/var/log/apache2/x-0008.huweb.hu.error
apache2   3009        root 4100w      REG        9,1      134     246464 
/var/log/apache2/x-0007.huweb.hu.error
apache2   3009        root 4101w      REG        9,1        0     246465 
/var/log/apache2/x-0006.huweb.hu.error
apache2   3009        root 4102w      REG        9,1      134     246466 
/var/log/apache2/x-0005.huweb.hu.error
apache2   3009        root 4103w      REG        9,1        0     246467 
/var/log/apache2/x-0004.huweb.hu.error
apache2   3009        root 4104w      REG        9,1      134     246468 
/var/log/apache2/x-0003.huweb.hu.error
apache2   3009        root 4105w      REG        9,1        0     246469 
/var/log/apache2/x-0002.huweb.hu.error
apache2   3009        root 4106w      REG        9,1      134     246470 
/var/log/apache2/x-0001.huweb.hu.error
apache2   3009        root 4107w      REG        9,1      751     245293 
/var/log/apache2/masik.huweb.hu.error
apache2   3009        root 4108w      REG        9,1    51297     245295 
/var/log/apache2/admin.huweb.hu.error
apache2   3009        root 4109w      REG        9,1        0     250584 
/var/log/apache2/x-4100.huweb.hu.access
apache2   3009        root 4110w      REG        9,1        0     250585 
/var/log/apache2/x-4099.huweb.hu.access
apache2   3009        root 4111w      REG        9,1        0     250586 
/var/log/apache2/x-4098.huweb.hu.access
apache2   3009        root 4112w      REG        9,1        0     250587 
/var/log/apache2/x-4097.huweb.hu.access
apache2   3009        root 4113w      REG        9,1        0     250588 
/var/log/apache2/x-4096.huweb.hu.access
apache2   3009        root 4114w      REG        9,1        0     250589 
/var/log/apache2/x-4095.huweb.hu.access
apache2   3009        root 4115w      REG        9,1        0     250590 
/var/log/apache2/x-4094.huweb.hu.access
apache2   3009        root 4116w      REG        9,1        0     250591 
/var/log/apache2/x-4093.huweb.hu.access
apache2   3009        root 4117w      REG        9,1        0     250592 
/var/log/apache2/x-4092.huweb.hu.access
...
apache2   3009        root 8199w      REG        9,1        0     247490 
/var/log/apache2/x-0010.huweb.hu.access
apache2   3009        root 8200w      REG        9,1        0     247491 
/var/log/apache2/x-0009.huweb.hu.access
apache2   3009        root 8201w      REG        9,1        0     247492 
/var/log/apache2/x-0008.huweb.hu.access
apache2   3009        root 8202w      REG        9,1        0     247493 
/var/log/apache2/x-0007.huweb.hu.access
apache2   3009        root 8203w      REG        9,1        0     247494 
/var/log/apache2/x-0006.huweb.hu.access
apache2   3009        root 8204w      REG        9,1        0     247495 
/var/log/apache2/x-0005.huweb.hu.access
apache2   3009        root 8205w      REG        9,1        0     247496 
/var/log/apache2/x-0004.huweb.hu.access
apache2   3009        root 8206w      REG        9,1        0     247497 
/var/log/apache2/x-0003.huweb.hu.access
apache2   3009        root 8207w      REG        9,1        0     247498 
/var/log/apache2/x-0002.huweb.hu.access
apache2   3009        root 8208w      REG        9,1        0     247499 
/var/log/apache2/x-0001.huweb.hu.access
apache2   3009        root 8209w      REG        9,1     9735     279184 
/var/log/apache2/custom/masik.huweb.hu.access
apache2   3009        root 8210w      REG        9,1   434971     279185 
/var/log/apache2/custom/admin.huweb.hu.access
apache2   3009        root 8211w      REG        9,1        0    2093057 
/var/run/apache2/ssl_mutex (deleted)


 G.
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to