修复Error: Too many open files

admin 提交于 周四, 11/17/2022 - 18:28

命令行下ulimit -aS可查看最大打开文件数。

ulimit -n 65535可设置最大打开文件数。

下面步骤可调大Apache里php进程的最大打开文件数(默认可能是1024):

修改/usr/lib/systemd/system/httpd.service里的LimitNOFILE=65535,

sudo systemctl daemon-reload

sudo service httpd restart

参考:https://support.cpanel.net/hc/en-us/articles/360060908434-How-to-increase-the-number-of-open-files-allowed-for-Apache-on-CentOS-7 

添加新评论

Restricted HTML

  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img src>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。
验证码
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
请输入"汉语"