攻城中止由于过度插座故障(Siege aborted due to excessive socket

2019-09-02 08:56发布

我也遇到这个问题,而试图逃跑从围困在Mac OS X 10.8.3以下CMD。

siege -d1 -c 20 -t2m -i -f -r10 urls.txt

从围困的输出是下面的:

** SIEGE 2.74
** Preparing 20 concurrent users for battle.
The server is now under siege...
done.
siege aborted due to excessive socket failure; you
can change the failure threshold in $HOME/.siegerc

Transactions:                  0 hits
Availability:               0.00 %
Elapsed time:              27.04 secs
Data transferred:           0.00 MB
Response time:              0.00 secs
Transaction rate:           0.00 trans/sec
Throughput:             0.00 MB/sec
Concurrency:                0.00
Successful transactions:           0
Failed transactions:            1043
Longest transaction:            0.00
Shortest transaction:           0.00

FILE: /usr/local/var/siege.log
You can disable this annoying message by editing
the .siegerc file in your home directory; change
the directive 'show-logfile' to false.

Answer 1:

这个问题可能是你用尽临时端口。 为了弥补这方面,无论是扩展端口的使用数量,或减少港口停留在TIME_WAIT,或两者的持续时间。

展开可用端口:

检查您的当前设置:

$ sudo sysctl net.inet.ip.portrange.hifirst

net.inet.ip.portrange.hifirst: 49152

将它设置降低,扩大你的窗口:

$ sudo sysctl -w net.inet.ip.portrange.hifirst=32768

net.inet.ip.portrange.hifirst: 49152 -> 32768

(hilast应该已经处于最高,65536)

降低最大段寿命

$ sudo sysctl -w net.inet.tcp.msl=1000

net.inet.tcp.msl: 15000 -> 1000



文章来源: Siege aborted due to excessive socket failure