We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
最近在使用wrk做接口压力测试时,-c 参数超过1024时就会报错:Too many open files; 一顿求证,就有了下面的解决方法,调大系统默认的ulimit值即可。
Too many open files
#查看ulimit情况 $ ulimit -a #同一时间用户可开启的最大进程数 $ ulimit -u #同一时间用户可打开的最大文件数 $ ulimit -n
/etc/security/limits.conf
65536
65565
* soft nofile 65536 # open files (-n) * hard nofile 65536 * soft nproc 65565 * hard nproc 65565 # max user processes (-u)
本机:注销系统重新登录。
远端服务器:退出ssh终端重新链接即可。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
最近在使用wrk做接口压力测试时,-c 参数超过1024时就会报错:
Too many open files
;一顿求证,就有了下面的解决方法,调大系统默认的ulimit值即可。
同一时间系统允许用户开启最大进程数量和最大可打开文件链接句柄数
1.1 查看
1.2 编辑
/etc/security/limits.conf
追加如下配置内容,允许最大值:65536
,65565
1.3 永久生效
本机:注销系统重新登录。
远端服务器:退出ssh终端重新链接即可。
The text was updated successfully, but these errors were encountered: