Within my Apache2 error.log file, i see several error messages like: [error] (9)Bad file descriptor: apr_socket_accept: (client socket) [error] (9)Bad file descriptor: apr_socket_accept: (client socket) [warn] long lost child came home! (pid 12345) [notice] Graceful restart requested, doing restart [error] (9)Bad file descriptor: apr_socket_accept: (client socket) (9)Bad file descriptor: apr_socket_accept: (client socket) The Bad file descriptor error message seems to appear everytime Apache restarts. Does anyone what this error message means? I had this problem in the past too and understand that it seams to be a bug in Apache2, but now i am not sure... Debian Etch/Apache 2.2.3. Can anyone tell me more about such an error end if possible how to ovoid it. Thanks in advance!
(I know it is not the latest Apache2 version available) but the latest Apache2 version wich comes with Etch is 2.2.3. And as you can see, all the packages are installed already: # apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert Reading package lists... Done Building dependency tree... Done apache2 is already the newest version. apache2-doc is already the newest version. apache2-mpm-prefork is already the newest version. apache2-utils is already the newest version. libexpat1 is already the newest version. ssl-cert is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. My system is up to date as i do an apt-get update/upgrade every single day. httpd -V also gives me:Apache 2.2.3
Seems to be a problem with graceful restarts: http://www.linuxquestions.org/questions/linux-server-73/apache-bad-file-descriptor-593925/ https://issues.apache.org/bugzilla/show_bug.cgi?id=42829 Do you get the same error when you run a normal restart or a stop and then start?
Thanks Falko, That are the articles i found too. For this reason i think indeed it's a bug in Apache 2.2.3. When i do a normal start/stop or restart i don't have any error in /var/log/apache2/error.log.
According to http://www.linuxquestions.org/questions/linux-server-73/apache-bad-file-descriptor-593925/ , this is also a problem with 2.2.6 (and probably 2.2.4 and 2.2.5 as well).
I guess i have to wait until Debian Lenny comes out. I've read Lenny will come with Apache2 version 2.2.9.
Try different MPM module Have you tried installing apache with a different MPM module? If your website/webapp uses a connector to a multithreaded backend (ajp13?), you might want to try using the worker MPM. #apt-get install apache2 apache2-doc apache2-mpm-worker apache2-utils libexpat1 ssl-cert The error message itself might be a bug: https://issues.apache.org/bugzilla/show_bug.cgi?id=42829 The work around is to do a hard restart instead of a graceful restart when using mod_prefork. If you have apache managing multiple ajp13 backend connections, I would try running mod_worker, not as a workaround to this bug, but for better performance and reliability.
Bad file descriptor: apr_socket_accept Please check your virtual host has correct parameters. If you have wrong parameters there you will get the same exception.