首頁 >php教程 >php手册 >Starting php_fpm eAccelerator: Could not allocate

Starting php_fpm eAccelerator: Could not allocate

WBOY
WBOY原創
2016-06-06 20:10:481300瀏覽

注:今天64位机器碰到同样情况,转之 启动PHP错误信息如下: Starting php_fpm eAccelerator: Could not allocate 67108864 bytes, the maximum size the kernel allows is 33554432 bytes. Lower the amount of memory request or increase the limit in /p

注:今天64位机器碰到同样情况,转之

启动PHP错误信息如下:

Starting php_fpm eAccelerator: Could not allocate 67108864 bytes, the maximum size the kernel allows is 33554432 bytes. Lower the amount of memory request or increase the limit in /proc/sys/kernel/shmmax.
PHP 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

解决办法如下:

/etc/sysctl.conf 新增:
kernel.shmmax = 128000000

sysctl -p

#说明
php.ini中设置的eAccelerator,eaccelerator.shm_size="64",解释:eaccelerator可使用的共享内存大小(单位为MB),即64M
在Linux下,单个进程的最大内存使用量受/proc/sys/kernel/shmmax中设置的数字限制(单位为字节)  /proc/sys/kernel/shmmax = 33554432 (32M)


from http://lihuipeng.blog.51cto.com/3064864/774721
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn