[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#189094: File descriptor leackage



Package: apache-ssl
Version: 1.3.26.1+1.48-0woody3

I have apache-ssl serving about 200 virtual domains on a Debian Woody. Each 
domain is both SSLEnable and SSLDisable. I keep only one access.log and one 
error.log file, defined in the main section of httpd.conf.

I suspect a file descriptor leak: just a few seconds after the start, apache 
processes uses more than 6000 file descriptors (checked with lsof).

The output of lsof is interesting: each apache instance, opens and keeps 
opened the /etc/apache-ssl directory, as you can see:

apache-ss  2702   root    5r   DIR    9,0   4096     46576 /etc/apache-ssl
apache-ss  2702   root    6r   DIR    9,0   4096     46576 /etc/apache-ssl
apache-ss  2702   root    7r   DIR    9,0   4096     46576 /etc/apache-ssl
apache-ss  2702   root    8r   DIR    9,0   4096     46576 /etc/apache-ssl
apache-ss  2702   root    9r   DIR    9,0   4096     46576 /etc/apache-ssl
apache-ss  2702   root   10r   DIR    9,0   4096     46576 /etc/apache-ssl
....
....

Those file descriptors alone are more than 5000!

I tried the same httpd.conf file with apache non ssl, disabling only SSL 
related directives: no /etc/apache-ssl directory results in lsof, and just 
about 400 file descriptors were used.

Obviously I get several warnings in error.log:

   [warn] send body: filedescriptor (3609) larger than FD_SETSIZE (1024)
   found, you probably need to rebuild Apache with a larger FD_SETSIZE

and sometimes apache dies with:

   [crit] error:02001018:system library:fopen:Too many open file

Another synptom is that some cgi stops working (wwwcount).

-- 
Niccolo Rigacci
http://www.texnet.it/



Reply to: