我不断收到此错误,nginx/error.log
并让我发疯:
8096 worker_connections exceed open file resource limit: 1024
我已经尝试了所有我能想到的东西,但无法弄清楚什么限制了Nginx。你能告诉我我想念什么吗?
nginx.conf
有这个:
worker_processes 4;
events {
worker_connections 8096;
multi_accept on;
use epoll;
}
我这样更改了系统的Ulimit security/limits.conf
:
# 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
它仍然显示错误。所以我也尝试编辑/etc/default/nginx
并添加了这一行:
ULIMIT="-n 65535"
它仍然显示相同的错误。无法弄清楚是什么将nginx worker连接限制为仅1024。您能指出我吗?
我有Debian 7 + Nginx
/etc/default/nginx file
。太棒了 谢谢@Xaviour