You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2006/12/31 03:35:25 UTC

DO NOT REPLY [Bug 41270] New: - TCP_DEFER_ACCEPT timeout set way too low

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41270>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41270

           Summary: TCP_DEFER_ACCEPT timeout set way too low
           Product: Apache httpd-2
           Version: 2.2.3
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: dean@arctic.org


the TCP_DEFER_ACCEPT code for linux sets the timeout to 1 second.  this is
totally broken... ideally the value should be configurable via AcceptFilter or
otherwise, but at a minimum it should be something like 30 seconds.

it's only by sheer luck that the current code doesn't cause havoc -- because the
kernel itself isn't doing the right thing with the timeout and is waiting a lot
longer than specified.

-dean

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41270] - TCP_DEFER_ACCEPT timeout set way too low

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41270>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41270





------- Additional Comments From chip@force-elite.com  2007-02-18 23:09 -------
(In reply to comment #3)
> Question to the BSD guys: Is it possible to set a timeout for the BSD accept
> filters accf_data and accf_http how long they should wait for a request until
> they drop the socket?

No, there isn't a way to set the timeout on the FreeBSD accept filters.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41270] - TCP_DEFER_ACCEPT timeout set way too low

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41270>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41270





------- Additional Comments From dean@arctic.org  2007-01-30 01:34 -------
btw, i've been running with a 30s setting for TCP_DEFER_ACCEPT for 13 months now
on a 40+ req/s website without any problems.  i really don't see the harm in
changing apache to have a sane setting for this value.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41270] - TCP_DEFER_ACCEPT timeout set way too low

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41270>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41270





------- Additional Comments From david@weekly.org  2007-02-06 01:27 -------
Please kill me. Sorry.

(In reply to comment #10)
> (In reply to comment #9)
> > The Linux tcp(7) man page indicates that the parameter is NOT the number of
> > seconds... 
> 
> um:
> 
> > Quote below:
> > 
> > TCP_DEFER_ACCEPT
> > "Allows a listener to be awakened only when data arrives on the socket. Takes an
> > integer value (seconds)
>                  ^^^^^^^



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41270] - TCP_DEFER_ACCEPT timeout set way too low

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41270>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41270





------- Additional Comments From david@weekly.org  2007-02-05 17:07 -------
The Linux tcp(7) man page indicates that the parameter is NOT the number of
seconds the kernel waits but instead is the number of attempts the TCP stack
should make to complete the connection. This would indicate a value like "3" to
be much more sane than "30", which could invite abuse.

Quote below:

TCP_DEFER_ACCEPT
"Allows a listener to be awakened only when data arrives on the socket. Takes an
integer value (seconds), this can bound the maximum number of attempts TCP will
make to complete the connection. This option should not be used in code intended
to be portable."

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41270] - TCP_DEFER_ACCEPT timeout set way too low

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41270>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41270





------- Additional Comments From jorton@redhat.com  2007-01-30 02:22 -------
Agreed, thanks for the patch and analysis; committed as
http://svn.apache.org/viewvc?view=rev&rev=501364

I've prodded some kernel guys, hopefully someone can clarify the semantics of
the option argument and follow up your netdev post.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41270] - TCP_DEFER_ACCEPT timeout set way too low

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41270>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41270





------- Additional Comments From dean@arctic.org  2006-12-31 05:12 -------
if there's any amount of packet loss (or geosynchronous orbit satellites
involved), the 3-way handshake will never complete if the server gives up after
1 second... i'm sure if you dig through the RFCs you'll find standards
requirements backing this up.

-dean

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41270] - TCP_DEFER_ACCEPT timeout set way too low

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41270>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41270





------- Additional Comments From dean@arctic.org  2006-12-30 18:36 -------
Created an attachment (id=19332)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19332&action=view)
set TCP_DEFER_ACCEPT to 30 seconds


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41270] - TCP_DEFER_ACCEPT timeout set way too low

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41270>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41270





------- Additional Comments From dean@arctic.org  2007-02-05 18:01 -------
(In reply to comment #9)
> The Linux tcp(7) man page indicates that the parameter is NOT the number of
> seconds... 

um:

> Quote below:
> 
> TCP_DEFER_ACCEPT
> "Allows a listener to be awakened only when data arrives on the socket. Takes an
> integer value (seconds)
                 ^^^^^^^

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41270] - TCP_DEFER_ACCEPT timeout set way too low

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41270>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41270


rpluem@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




------- Additional Comments From rpluem@apache.org  2006-12-31 04:53 -------
(In reply to comment #0)
> the TCP_DEFER_ACCEPT code for linux sets the timeout to 1 second.  this is
> totally broken... ideally the value should be configurable via AcceptFilter or
> otherwise, but at a minimum it should be something like 30 seconds.

I agree that it makes sense to keep this value configurable. But what do you
think is actually "totally broken" with the 1 second setting (provided the
kernel would do the right thing)? Do you think too much clients, which have
a slow / bad connection to the httpd server will not get a connection because
it is dropped by the kernel before they can sent data?

Question to the BSD guys: Is it possible to set a timeout for the BSD accept
filters accf_data and accf_http how long they should wait for a request until
they drop the socket?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41270] - TCP_DEFER_ACCEPT timeout set way too low

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41270>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41270


dean@arctic.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW




------- Additional Comments From dean@arctic.org  2007-01-30 01:07 -------
sorry, but i can't stand this being left as NEEDINFO when it should be obvious
to anyone that a one second timeout for the 3rd packet in a 3-way handshake is
insane.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41270] - TCP_DEFER_ACCEPT timeout set way too low

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41270>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41270





------- Additional Comments From dean@arctic.org  2006-12-30 18:59 -------
see also http://marc.theaimsgroup.com/?l=linux-netdev&m=116753348815044&w=2

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41270] - TCP_DEFER_ACCEPT timeout set way too low

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41270>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41270





------- Additional Comments From rpluem@apache.org  2006-12-31 04:59 -------
http://lkml.org/lkml/2000/10/21/80 provides also an interesting discussion on
the Linux kernel behaviour.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org