Re: : : : rouge IPs / user

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <misc@...>
Date: Thursday, December 13, 2007 - 4:24 pm

On Thu, Dec 13, 2007 at 12:35:03PM +0100, Otto Moerbeek wrote:
:

The behaviour is starting to make sense now. Scenario:

* The client connects to the server, sends its request and
then closes the socket, that is shutdown() aka half-close.
It can still read the reply.
* The server accepts the connection, reads the request,
and may or may not notice that the client has done
a shutdown() - it is not important. Nevertheless the
server can not close the socket since it has a
reply to deliver. And the server host TCP stack
has noticed the shutdown() so the socket already
enters CLOSE_WAIT.
* The server starts sending the reply which may be large
e.g a file download. In the middle of this transfer
the client's ethernet cable gets plugged out, the
client host gets powered off, a firewall in the
path goes bananas or whatnot.
* The server is now stuck in a write() call since the
server host TCP stack has to wait quite a while
to be sure the connection is really dead.
And the state is still CLOSE_WAIT.

If the client program would die, the client host TCP
stack would close the socket and tell the server host
TCP stack, that would fail the hanging write() call.
So there must be a harder error such as network
outage or power outage to induce this problem.

If this scenario is correct, there is nothing to do
about it, except decreasing the likelyhood of the
server socket being half-closed while sending
the reply, and having KeepAliveTimeout in
httpd.conf at its default (15) or slightly lower
seems to do the trick. But I do not know how.

If there is some quirk in httpd's implementation
of the KeepAliveTimeout that makes it not notice
the half-close and keeps the socket open the whole
KeepAliveTimeout, that would explain it.

--

/ Raimo Niskanen, Erlang/OTP, Ericsson AB

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
rouge IPs / user, badeguruji, (Fri Dec 7, 1:51 pm)
Re: rouge IPs / user, Raimo Niskanen, (Mon Dec 10, 7:31 am)
Re: rouge IPs / user, Joel Wiramu Pauling, (Mon Dec 10, 8:15 am)
Re: : rouge IPs / user, Raimo Niskanen, (Tue Dec 11, 6:56 am)
Re: : rouge IPs / user, Daniel Ouellet, (Tue Dec 11, 1:15 pm)
Re: : rouge IPs / user, knitti, (Tue Dec 11, 8:43 am)
Re: : rouge IPs / user, Marti Martinez, (Tue Dec 11, 12:40 pm)
Re: : rouge IPs / user, Stuart Henderson, (Tue Dec 11, 1:47 pm)
Re: : rouge IPs / user, knitti, (Tue Dec 11, 2:13 pm)
Re: : rouge IPs / user, Daniel Ouellet, (Tue Dec 11, 3:20 pm)
Re: : rouge IPs / user, knitti, (Tue Dec 11, 7:04 pm)
Re: : rouge IPs / user, Daniel Ouellet, (Tue Dec 11, 7:44 pm)
Re: : rouge IPs / user, knitti, (Tue Dec 11, 8:34 pm)
Re: : rouge IPs / user, knitti, (Wed Dec 12, 5:11 am)
Re: : : rouge IPs / user, Raimo Niskanen, (Wed Dec 12, 11:18 am)
Re: : : rouge IPs / user, Daniel Ouellet, (Wed Dec 12, 1:53 pm)
Re: : : rouge IPs / user, knitti, (Wed Dec 12, 4:03 pm)
Re: : : rouge IPs / user, Daniel Ouellet, (Wed Dec 12, 4:19 pm)
Re: : : rouge IPs / user, knitti, (Wed Dec 12, 4:44 pm)
Re: : : rouge IPs / user, Daniel Ouellet, (Thu Dec 13, 1:30 am)
Re: : : rouge IPs / user, Daniel Ouellet, (Wed Dec 12, 5:13 pm)
Re: : : rouge IPs / user, knitti, (Wed Dec 12, 5:42 pm)
Re: : : rouge IPs / user, Daniel Ouellet, (Thu Dec 13, 12:58 am)
Re: : : rouge IPs / user, Otto Moerbeek, (Wed Dec 12, 6:25 pm)
Re: : : rouge IPs / user, Daniel Ouellet, (Wed Dec 12, 9:57 pm)
Re: : : rouge IPs / user, Otto Moerbeek, (Thu Dec 13, 2:59 am)
Re: : : rouge IPs / user, Daniel Ouellet, (Thu Dec 13, 3:25 am)
Re: : : rouge IPs / user, Otto Moerbeek, (Thu Dec 13, 4:09 am)
Re: : : rouge IPs / user, Stuart Henderson, (Thu Dec 13, 7:10 am)
Re: : : rouge IPs / user, Hannah Schroeter, (Thu Dec 13, 7:30 am)
Re: : : rouge IPs / user, Otto Moerbeek, (Thu Dec 13, 7:35 am)
Re: : : : rouge IPs / user, Raimo Niskanen, (Thu Dec 13, 4:24 pm)
Re: : : : rouge IPs / user, Raimo Niskanen, (Thu Dec 13, 9:25 am)
Re: : : rouge IPs / user, knitti, (Wed Dec 12, 12:32 pm)
Re: : : rouge IPs / user, Daniel Ouellet, (Wed Dec 12, 3:43 pm)
Re: : : rouge IPs / user, knitti, (Wed Dec 12, 5:03 pm)
Re: : : rouge IPs / user, Daniel Ouellet, (Thu Dec 13, 1:17 am)
Re: : rouge IPs / user, Daniel Ouellet, (Tue Dec 11, 8:51 pm)
Re: : rouge IPs / user, Daniel Ouellet, (Tue Dec 11, 9:19 pm)
Re: rouge IPs / user, new_guy, (Fri Dec 7, 11:33 pm)
Re: rouge IPs / user, Axton, (Fri Dec 7, 4:45 pm)
Re: rouge IPs / user, STeve Andre', (Fri Dec 7, 2:08 pm)
Re: rouge IPs / user, Steve Shockley, (Fri Dec 7, 4:08 pm)
Re: rouge IPs / user, Daniel Ouellet, (Fri Dec 7, 2:03 pm)
Re: rouge IPs / user, Nick Guenther, (Fri Dec 7, 2:56 pm)
Re: rouge IPs / user, badeguruji, (Fri Dec 7, 4:32 pm)
Re: rouge IPs / user, Nick Guenther, (Sat Dec 8, 12:13 am)
Re: rouge IPs / user, Dan Farrell, (Wed Dec 12, 3:55 pm)
Re: rouge IPs / user, Jon Radel, (Fri Dec 7, 11:12 pm)
Re: rouge IPs / user, Greg Thomas, (Fri Dec 7, 2:26 pm)