【问题标题】:Siege aborted due to excessive socket failure由于套接字故障过多,围攻中止
【发布时间】:2013-05-09 13:44:39
【问题描述】:

我在 Mac OS X 10.8.3 上尝试从围攻中运行以下 cmd 时遇到了这个问题。

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

Siege 的输出如下:

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

【问题讨论】:

  • 看起来您正在检查已关闭的主机。

标签: linux macos load-testing


【解决方案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

【讨论】:

  • 听起来有道理,但对我没有帮助。
猜你喜欢
  • 2015-08-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-05-24
  • 2022-11-08
  • 1970-01-01
  • 2020-02-05
相关资源
最近更新 更多