Starting php-fpm eAccelerator: shmmax should be at least 2MB
2013-09-17Starting php_fpm eAccelerator: shmmax should be at least 2MB. PHP Warning: [eAccelerator] Can not create shared memory area in Unknown on line 0.
方法1:
echo "67108864" > /proc/sys/kernel/shmmax
方法2:
#vi /etc/sysctl.conf
kernel.shmmax = 67108864
#/sbin/sysctl -p
方法3:
主机为2G内存,RHEL4.5,i386,2.6.9-55.ELsmp.或者升级CentOS 5.9 x64不存在此问题。
注意:如果cat /proc/sys/kernel/shmmax 值一直为0表示你设置的shmmax有问题,一定要根据你服务器内存的大小进行设置。
2G内存的设置
kernel.shmall = 2097152
kernel.shmmax = 2147483648
4G内存的设置
kernel.shmall = 268435456
kernel.shmmax = 4294967295