Apache Timeout directive not working

apache-2.2connectiontcptimeout

I have configured /etc/apache2/apache2.conf with Timeout 5 instead of the default 300. So I understand it should close an incoming connection after 5 seconds of inactivity.

But I make a telnet localhost 80 , wait for 5 and more seconds, and nothing happens. A netstat -na tells me the connection is still ESTABLISHED. I left the connection about 5 minutes and still nothing happened.

Any clues why Apache is not cutting the connection? Or am I misunderstanding the Timeout directive? And in that case, which one should I look for?

Thank you

Best Answer

You do have the right syntax -- it should be in the global server config or a vhost config.

I tested this with 2.2.11 and Timeout closed a connection from another computer and a connection to localhost after 5 seconds. Have you tried from another machine? My config is certainly different, so you may have another setting that keeps localhost connected(?)

I tested with both nc and telnet and there was no difference either.

Which version of Apache are you using? Are you certain there is nothing coming across the wire (via wireshark or similar)?

Related Topic