由于过多的套接字故障,攻城术中止了 [英] Siege aborted due to excessive socket failure

查看:204
本文介绍了由于过多的套接字故障,攻城术中止了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试从Mac OS X 10.8.3上的包围中逃脱以下cmd时遇到了此问题.

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

Siege的输出如下:

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.

推荐答案

问题可能是您用完了临时端口.要解决此问题,请增加要使用的端口数量,或者减少端口在TIME_WAIT中停留的时间,或者两者兼而有之.

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.

扩展可用端口:

检查您当前的设置:

$ 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)

(hilast should already be at the max, 65536)

减少段的最大寿命

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

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

这篇关于由于过多的套接字故障,攻城术中止了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆