我正在做一个AB测试
ab -n 10000 -c 10 http://www.mysite.com/
这是输出
Benchmarking www.mysite.com (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
socket: Cannot allocate memory (12)
我试过几次,有时它会更早坏掉。我有很多可用内存,这是顶部当我跑步的时候AB
Mem: 524288k total, 269968k used, 254320k free, 0k buffers
有人能解释一下吗?
答案1
您在标签中提到了“vps”,我猜您遇到了容器资源限制,可能是并发开放端口。降低并发-c
性,看看是否有帮助。