蚁人日记 2021-06-15 10:09 采纳率: 0%
浏览 27

PHP站点海量 (Too many open files)异常信息

站点环境是:Centos7.6 Nginx1.8+php5.3+mysql5.6+宝塔,服务器配置是:阿里云ECS 2核+2G内存,站点当前没有任何流量,就自己一个人测试用,现在站点日志中报大量以下Log,请问如何解决,百度了一下是Too many open files 打开的文件过多,该异常信息平均每秒多达30条,

2021/06/15 09:54:04 [error] 1163#0: *55952 FastCGI sent in stderr: "Unable to open primary script: /www/wwwroot/modules/article/reader.php (Too many open files)" while reading response header from upstream, client: 157.90.209.80, server: www.a.com, request: "GET /197/105411_2.html HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi-53.sock:", host: "www.a.com"

 

通过ulimit -a查看

[root@Contes ~]# 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) 7270
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 65535
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 7270
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

请大牛们帮忙看看,本人WEB小白,请指点如何解决,最好是能附上执行操作步骤,万分感谢!
 

  • 写回答

3条回答 默认 最新

  • CSDN专家-sinJack 2021-06-15 10:14
    关注

    项目中有没有使用文件流没关闭的

    评论

报告相同问题?