apache - fatal error 无法分配134217728字节的共享内存段: mmap: Cannot allocate memory (12)

标签 apache memory centos

早上好,这是我从 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

这是猫/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
# 

我已经将无限设置为无限,并且我已经尝试了互联网上存在的所有东西。

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

最佳答案

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

# 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

关于apache - fatal error 无法分配134217728字节的共享内存段: mmap: Cannot allocate memory (12),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51541878/

相关文章:

php - Apache mod_rewrite : RewriteMap directive using PHP script on Windows machine

android - 有没有办法在 Android 上安全地处理内存中的敏感数据?

PHP fatal error : Call to undefined function mysql_connect()

php - 仅使用 CentOS 安全设置的本地域上的 file_get_contents() 安全问题

sql-server - Linux + Django + SQLServer

PHP $_SERVER ['HTTP_HOST' ] vs. $_SERVER ['SERVER_NAME' ],我是否正确理解了手册页?

java - Apache Ivy : Restrict Publishing to a Repository

php - Laravel 路由和 .htaccess 文件不适用于 1and1 托管

c++ - 扫描进程内存导致崩溃

jquery - 将 Bootstrap 与 jQuery 一起使用会导致大量内存使用