# ndd -set /dev/tcp tcp_conn_req_max 32
# ndd -set /dev/tcp tcp_close_wait_interval 30000This will also help ftp, gopher and any other one-shot protocols.
When a client (often Mac or a PC) opens a connection with the daemon, but dies in the middle of the response, the connection hangs up. If your http daemon is running stand-alone, you can stop the loop:
#! /bin/csh # # author: Arthur Secret (webmaster@w3.org) # set boum4 = `ps -ef | grep 'httpd ' | grep nobody | awk '{print $2}'` echo '#! /bin/csh' > /tmp/httpd_clean.tmp echo "kill $boum4" >> /tmp/httpd_clean.tmp echo ' ' >> /tmp/httpd_clean.tmp chmod +x /tmp/httpd_clean.tmp sleep 190 /tmp/httpd_clean.tmp rm /tmp/httpd_clean.tmp
nobody
. As we
need to create a crontab file for nobody, you must edit the file
/etc/cron.d/cron.allow
and add the line
nobody
crontab -e nobodyand insert the line
0,10,20,30,40,50 * * * * /usr/local/bin/httpd_clean > /dev/null 2>&1
/usr/local/bin/httpd_clean
, you may use this to clean
other daemons as well.