2

我正在运行多个 siege 实例,因此 siege 正在重用端口,因为某些请求没有通过。有没有办法让不同的攻城实例可以使用不同的端口范围?

   HTTP/1.1 200   0.00 secs:     146 bytes ==> 
   HTTP/1.1 200   0.00 secs:     146 bytes ==> 
   HTTP/1.1 200   0.00 secs:     146 bytes ==> 
   HTTP/1.1 200   0.00 secs:     146 bytes ==> 
   HTTP/1.1 200   0.01 secs:     146 bytes ==> 
   HTTP/1.1 200   0.00 secs:     146 bytes ==> 
   HTTP/1.1 200   0.01 secs:     146 bytes ==> 
   [alert] socket: 671299328 select timed out: Connection timed out
   [alert] socket: 788797184 select timed out: Connection timed out
   [alert] socket: 721655552 select timed out: Connection timed out
   [alert] socket: 738440960 select timed out: Connection timed out
   HTTP/1.1 200   0.01 secs:     146 bytes ==> /
   HTTP/1.1 200   0.01 secs:     146 bytes ==> /
   [alert] socket: 822368000 select timed out: Connection timed out
   HTTP/1.1 200   0.01 secs:     146 bytes ==> /
   HTTP/1.1 200   0.01 secs:     146 bytes ==> /
   HTTP/1.1 200   0.01 secs:     146 bytes ==> /
4

2 回答 2

0

您可以在 /etc/sysctl 文件中设置 net.ipv4.tcp_tw_reuse = 1 net.ipv4.tcp_tw_recycle = 1 并运行 #sysctl -p 来激活它。请试一试。希望这可以帮到你。

于 2014-02-08T09:59:43.557 回答
0

我看到你一个接一个地有很多请求,你认为你会不会有 KeepAlive 的问题。

在服务器上,套接字打开的时间比单独连接的时间长一点。如果 KeepAlive 设置为高值,您可以很快用完端口。

于 2013-11-04T14:19:29.860 回答