apache启动报 shmget() failed: Invalid argument的解决方法
在用的apache服务器,启动报错:
shmget() failed: Invalid argument
Failed to start up concurrent users module!
经检查为kernel.shmmax设置未生效(copy另一系统的,数值设置大了)
如下:
[root@localhost ~]# sysctl -a | grep shmm
kernel.shmmni = 4096
kernel.shmmax = 0
[root@localhost ~]# vi /etc/sysctl.conf
kernel.shmmax = 2147483648
kernel.shmall = 1073742
[root@localhost ~]# sysctl -p
[root@localhost ~]# sysctl -a | grep shm
vm.hugetlb_shm_group = 0
kernel.shmmni = 4096
kernel.shmall = 1073742
kernel.shmmax = 2147483648
kernel.shmmax 数值说明:
单位:字节。一般建议使用物理内存的一半
以4G内存为例:4096/2*1024*1024=2147483648
kernel.shmall 数值说明:
单位:页。1页=4k,设置数值则为物理内存大小
以4G内存为例:4096*1024*1024/4000=1073742
注:以上两项数值如果填写大于本身物理内存则会不生效。
希望以上介绍的解决方法,可以解决大家遇到的问题。
相关文章
关于opensips用户认证配置文件 opensips.cfg 使用介绍
本篇文章小编为大家介绍,关于opensips用户认证配置文件opensips.cfg使用介绍。需要的朋友参考下2013-04-04


最新评论