套接字:打开的文件太多 (24) apache bench lighttpd [英] socket: Too many open files (24) apache bench lighttpd
本文介绍了套接字:打开的文件太多 (24) apache bench lighttpd的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我开始 Apache Bench 测试时:
When I start Apache Bench test:
ab -n 10000 -c 1300 http://domain.com/test.php>
ab -n 10000 -c 1300 http://domain.com/test.php
出现错误:
socket:打开的文件太多 (24)
socket: Too many open files (24)
当我更改为-c 1000"时,它工作正常.
When i change to '-c 1000' it works fine.
因为我可以有超过1000个并发用户我想修复socket太多打开文件的问题或增加参数.如何做到这一点以及在哪里?
Because I can have more than 1000 concurrent users I would like to fix socket too many open files problem or increase parameter. How to do this and where?
我在 centos 5 上使用 lighttpd.
I use lighttpd on centos 5.
推荐答案
ulimit -n 10000
这可能不起作用,具体取决于您的系统配置请参阅此以配置您的系统.
That might not work depending on you system configuration Consult this to configure your system.
这篇关于套接字:打开的文件太多 (24) apache bench lighttpd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文