【问题标题】:Fatal Error Unable to allocate shared memory segment of 134217728 bytes: mmap: Cannot allocate memory (12)致命错误无法分配 134217728 字节的共享内存段:mmap:无法分配内存 (12)
【发布时间】:2018-11-10 06:39:03
【问题描述】:

早上好,这是我从 apache 错误中得到的结果

Fatal Error Unable to allocate shared memory segment of 134217728 bytes: mmap: Cannot allocate memory (12)

这是我的 ipcs -lm

------ Limiti della memoria condivisa --------
max number of segments = 4096
max seg size (kbytes) = 131072
max total shared memory (kbytes) = 536870912
dimensione min seg (byte) = 1

这是 cat /etc/sysctl.conf

# Controls the default maxmimum size of a mesage queue
# kernel.msgmnb = 65536

# Controls the maximum size of a message, in bytes
# kernel.msgmax = 65536

# Controls the maximum shared segment size, in bytes
# kernel.shmmax = 200000000

# Controls the maximum number of shared memory segments, in pages
# kernel.shmall = 50000
# 

我已将 unlimit 设置为无限制,并且我已经尝试了互联网上的所有内容。

你能告诉我有什么问题吗?

【问题讨论】:

  • 什么时候出现这个错误?加载时?
  • 我有时在我的 PHP 应用程序中得到 500error,我在 apache 的 error_log 中得到这个错误

标签: apache memory centos


【解决方案1】:

首先, 请考虑删除之前的#号

# kernel.shmmax = 200000000
# kernel.shmall = 50000

像这样:

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 200000000

# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 50000

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-06-03
    • 1970-01-01
    • 1970-01-01
    • 2017-04-11
    • 1970-01-01
    • 2020-01-14
    • 2013-09-16
    相关资源
    最近更新 更多