码迷,mamicode.com
首页 > 其他好文 > 详细

nginx_Too many open files

时间:2014-08-05 22:57:10      阅读:485      评论:0      收藏:0      [点我收藏+]

标签:accept() failed (24: too many open files)

2014/08/05 08:53:49 [alert] 13576#0: accept() failed (24: Too many open files)



方法一:只对root和nodbdy用户增加该值。

#vim /etc/security/limits.conf

root soft nofile 10240

root hard nofile 10240

nobody soft nofile 10240

nobody hard nofile 10240


方法二:对所有用户增加该值

 代码如下 复制代码

* soft nofile 655360

* hard nofile 655360


编辑nginx配置文件

#vim /etc/nginx/nginx.conf

worker_rlimit_nofile 10240;

worker_connections 10240;


注意:需要重启系统

#lsof | wc -l

1465

# ulimit -a

core file size          (blocks, -c) 0

data seg size           (kbytes, -d) unlimited

scheduling priority             (-e) 0

file size               (blocks, -f) unlimited

pending signals                 (-i) 3675

max locked memory       (kbytes, -l) 64

max memory size         (kbytes, -m) unlimited

open files                      (-n) 10240

pipe size            (512 bytes, -p) 8

POSIX message queues     (bytes, -q) 819200

real-time priority              (-r) 0

stack size              (kbytes, -s) 10240

cpu time               (seconds, -t) unlimited

max user processes              (-u) 3675

virtual memory          (kbytes, -v) unlimited

file locks                      (-x


本文出自 “linux网络服务搭建” 博客,谢绝转载!

nginx_Too many open files,布布扣,bubuko.com

nginx_Too many open files

标签:accept() failed (24: too many open files)

原文地址:http://8824130.blog.51cto.com/8814130/1536091

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!