Nee*_*eel 17 linux files debian nginx ulimit
我不断收到此错误nginx/error.log并让我发疯:
8096 worker_connections exceed open file resource limit: 1024
Run Code Online (Sandbox Code Playgroud)
我已经尝试了所有我能想到的方法,但无法弄清楚是什么限制了 nginx。你能告诉我我错过了什么吗?
nginx.conf 有这个:
worker_processes 4;
events {
worker_connections 8096;
multi_accept on;
use epoll;
}
Run Code Online (Sandbox Code Playgroud)
我security/limits.conf像这样更改了系统的 Ulimit :
# This is added for Open File Limit Increase
* hard nofile 199680
* soft nofile 65535
root hard nofile 65536
root soft nofile 32768
# This is added for Nginx User
nginx hard nofile 199680
nginx soft nofile 65535
Run Code Online (Sandbox Code Playgroud)
它仍然显示错误。所以我也尝试编辑/etc/default/nginx并添加了这一行:
ULIMIT="-n 65535"
Run Code Online (Sandbox Code Playgroud)
它仍然显示相同的错误。无法弄清楚是什么将 nginx 工作连接限制为 1024。你能指出我吗?
我有 Debian 7 + nginx
Xav*_*cas 35
worker_rlimit_nofile 65535;在主要上下文中的 nginx.conf 中设置。
| 归档时间: |
|
| 查看次数: |
41436 次 |
| 最近记录: |