【问题标题】:Apache buffer overflow with too many virtual hostApache 缓冲区溢出,虚拟主机过多
【发布时间】:2018-02-14 03:53:39
【问题描述】:

我有带有 httpd 2.4.6-45.el7.centos.4 和 PHP 5.6.31 的 Centos 7

当我尝试加载网站时,一旦超过 1000 多个虚拟主机,就会检测到缓冲区溢出。每个虚拟主机都有一个error_log。 但我可以加载一个简单的 phpinfo() 或 html 页面。

我所做的唯一调整是能够在不破坏无文件限制的情况下启动 httpd。 (我收到太多打开文件错误)

/etc/systemd/system/httpd.service.d/limits.conf
[Service]
LimitNOFILE=30000

当我在这里数 /proc/16402/fd 的 FD 数量时,我有 1051 个。 但遗憾的是,当我检查时没有 1024 个限制:

cat /proc/16402/limits
Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            8388608              unlimited            bytes
Max core file size        0                    unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             256005               256005               processes
Max open files            30000                30000                files
Max locked memory         65536                65536                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       256005               256005               signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us

【问题讨论】:

    标签: php apache centos buffer-overflow file-descriptor


    【解决方案1】:

    原来,这是 mod_php 的问题。我配置了 php-fpm,它现在可以工作了。

    【讨论】:

      猜你喜欢
      • 2010-10-22
      • 1970-01-01
      • 2011-12-19
      • 1970-01-01
      • 2017-01-02
      • 2013-05-22
      • 2015-12-16
      • 1970-01-01
      • 2010-11-11
      相关资源
      最近更新 更多