linux – nginx uLimit’worker_connections超出打开文件资源限
发布时间:2020-12-13 18:28:37 所属栏目:Linux 来源:网络整理
导读:我一直在nginx / error.log中得到这个错误,它让我疯狂: 8096 worker_connections exceed open file resource limit: 1024 我已经尝试了所有我能想到的东西,并且无法弄清楚这里有什么限制nginx.你能说出我错过了什么吗? nginx.conf有这个: worker_processe
我一直在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; } 我在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 它仍然显示错误.所以我也尝试编辑/ etc / default / nginx并添加了这一行: ULIMIT="-n 65535" 它仍然显示相同的错误.无法弄清楚什么是限制nginx工人连接只有1024.你能指出我吗? 我有Debian 7 nginx 解决方法
设置worker_rlimit_nofile 65535;在主上下文中的nginx.conf中.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |