Siege aborted due to excessive socket failure

匿名 (未验证) 提交于 2019-12-03 02:51:02

问题:

I have encountered this problem whilst trying to run off the following cmd from siege on Mac OS X 10.8.3.

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

The output from Siege is the following:

** 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. 

回答1:

The problem may be that you run out of ephemeral ports. To remedy that, either expand the number of ports to use, or reduce the duration that ports stay in TIME_WAIT, or both.

Expand the usable ports:

Check your current setting:

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

net.inet.ip.portrange.hifirst: 49152

Set it lower to expand your window:

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

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

(hilast should already be at the max, 65536)

Reduce the maximum segment lifetime

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

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



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!