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 2013/09/14 00:39:26 UTC

[Bug 55556] New: apachebench (ab) doesn't use so_reuseaddr

https://issues.apache.org/bugzilla/show_bug.cgi?id=55556

            Bug ID: 55556
           Summary: apachebench (ab) doesn't use so_reuseaddr
           Product: Apache httpd-2
           Version: 2.2.15
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
          Assignee: bugs@httpd.apache.org
          Reporter: issues.apache.org@ch.pkts.ca

I've been running the command:

ulimit -n 20010 ; ab -n 20000 -c 20000 http://my.host.com/

And found that after running it a few times, it refuses to run and gives the
following error:

apr_socket_connect(): Cannot assign requested address (99)

It would appear that all tcp sockets are in a WAIT state, and can't be reused
until the timer expires on some of the sockets.

If the sockets that ab uses were marked with 'SO_REUSEADDR', this problem might
go away.

Thanks!

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55556] apachebench (ab) doesn't use so_reuseaddr

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55556

Yann Ylavic <yl...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ylavic.dev@gmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55556] apachebench (ab) doesn't use so_reuseaddr

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55556

--- Comment #1 from Yann Ylavic <yl...@gmail.com> ---
Even with SO_REUSEADDR, you can't reuse a TIME_WAITing client's IP:port to
connect the same server's IP:port.

On linux, you can do things like "sysctl -w net.ipv4.tcp_tw_recycle=1" to kind
of ignore TIME_WAIT delays, but your network should better not loose/retransmit
packets that could interfere with subsequent connections, that's the purpose of
the TIME_WAIT state, however it can be a temporary setting for the duration of
the bench...

The best option (though more expensive) is to use multiple ab clients on as
much machines or NICs (with "ip route add ... dev NIC").

-- 
You are receiving this mail because:
You are the assignee for the bug.

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