Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Mar 2005 17:00:44 -0500
From:      Charles Swiger <cswiger@mac.com>
To:        kalin mintchev <kalin@el.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: kern.ipc.nmbclusters
Message-ID:  <d4f40862ed6def7dd904ce555d36d1ea@mac.com>
In-Reply-To: <54755.68.165.89.73.1111009454.squirrel@68.165.89.73>
References:  <52214.68.165.89.73.1110927742.squirrel@68.165.89.73> <1110945574l.25764l.2l@BARTON> <53058.68.165.89.73.1110948884.squirrel@68.165.89.73> <54481.68.165.89.73.1111003279.squirrel@68.165.89.73> <8ba66af9dfd749cff4ec033004d93fdc@mac.com> <54755.68.165.89.73.1111009454.squirrel@68.165.89.73>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 16, 2005, at 4:44 PM, kalin mintchev wrote:
>> You were exceeding the amount of socket buffer memory available there.
>
> i'm aware of that. the question is why?

The literal answer is that this pool of open connections with lots of 
unsent data is clogging things up.  Why those connections are not going 
away is the real question to figure out....

>> FIN_WAIT_1 means that one side of the TCP conversation sent a FIN, and
>> the other side (yours) wants to flush the queue of unsent data and 
>> will
>> then close the connection.  It's not clear why this isn't working, and
>> there is a timer which gets started which ought to close the 
>> connection
>> after 10 minutes or so if no data can be sent.
>
> well that was what i was suggesting in my post but the sever is set to 
> cut
> inactive connections after 10 seconds - not minutes. is there any other
> timer i'm missing here?

You are probably referring to the KeepAlive directive in the Apache 
config file, but there are other timers present in the TCP stack 
itself: specificly, the one described in RFC-793 around section 3.5, 
involving a 2 * MSL wait:

"3.5.  Closing a Connection

   CLOSE is an operation meaning "I have no more data to send."  The
   notion of closing a full-duplex connection is subject to ambiguous
   interpretation, of course, since it may not be obvious how to treat
   the receiving side of the connection.  We have chosen to treat CLOSE
   in a simplex fashion.  The user who CLOSEs may continue to RECEIVE
   until he is told that the other side has CLOSED also.  Thus, a program
   could initiate several SENDs followed by a CLOSE, and then continue to
   RECEIVE until signaled that a RECEIVE failed because the other side
   has CLOSED.  We assume that the TCP will signal a user, even if no
   RECEIVEs are outstanding, that the other side has closed, so the user
   can terminate his side gracefully.  A TCP will reliably deliver all
   buffers SENT before the connection was CLOSED so a user who expects no
   data in return need only wait to hear the connection was CLOSED
   successfully to know that all his data was received at the destination
   TCP.  Users must keep reading connections they close for sending until
   the TCP says no more data."

-- 
-Chuck



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d4f40862ed6def7dd904ce555d36d1ea>