【问题标题】:Setting ulimits for apache on CentOS [closed]在 CentOS 上为 apache 设置 ulimits [关闭]
【发布时间】:2012-05-22 18:48:26
【问题描述】:

我一直尝试更改在 CentOS 上运行的 apache 的 ulimit 参数设置。这是我的 /etc/security/limits.conf 的设置

apache hard fszie 1024
apache soft fszie 1024
apache hard nproc 512
apache soft nproc 512
apache hard cpu 14
apache soft cpu 14
apache hard nofile 1024
apache soft nofile 1024

我也重新启动了我的系统,但是当我尝试使用 PHP 脚本检查 apache 的 ulimit 参数时,它们没有设置。有什么我遗漏的东西,我是否需要在某处创建其他条目或其他参数?请推荐

【问题讨论】:

  • 属于 serverfault 或其他地方。

标签: centos ulimit


【解决方案1】:

最后我得到了答案,如果您为用户使用登录名但没有 apache 的登录名,上述设置将有所帮助,因此您必须将 ulimit -H -n filno 等命令放入您的 /etc/init.d /httpd 脚本并重新启动服务器。希望这对其他人有帮助。

【讨论】:

  • 我觉得最好改/etc/sysconfig/httpd,加上ulimit -H -n 10240,然后重启apache。
猜你喜欢
  • 2011-05-31
  • 1970-01-01
  • 2014-04-04
  • 1970-01-01
  • 1970-01-01
  • 2014-03-02
  • 1970-01-01
  • 2018-03-31
  • 1970-01-01
相关资源
最近更新 更多