- [root@GFS_Server etc]# ulimit -SHn 65535
- [root@GFS_Server etc]# /data/webserver/php/sbin/php-fpm start
- Starting php_fpm eAccelerator: shmmax should be at least 2MBPHP Warning: [eAccelerator] Can not create shared memory area in Unknown on line 0
- PHP Fatal error: Unable to start eAccelerator module in Unknown on line 0
- failed
- 解析:
- Starting php_fpm eAccelerator: shmmax should be at least 2MBPHP
- 看到了吗?要求是至少2MB以上
- [eAccelerator] Can not create shared memory area in Unknown on line 0
- 其实就是共享池的不足原因导致
- PHP Fatal error: Unable to start eAccelerator module in Unknown on line 0
- failed
- 解决办法:
- #echo “67108864” > /proc/sys/kernel/shmmax
- #cat /proc/sys/kernel/shmmax
- 67108864
- 如果想让它每次开机都执行一样的,那么就改:
- #vi /etc/sysctl.conf
- 加下面一行:
- kernel.shmmax = 67108864
- #/sbin/sysctl -p (让其快速生效)
- 重启后:
- [root@GFS_Server etc]# ulimit -SHn 65535
- [root@GFS_Server etc]# /data/webserver/php/sbin/php-fpm start
- Starting php_fpm done
- OK,Problem is solved!
- [root@GFS_Server etc]# ps aux |grep php-fcgi |wc -l
- 302
转载于:https://blog.51cto.com/brokensmile/632970