解決錯誤: Unable To Allocate Memory For Pool
  • 3,663 views,
  • 2014-08-13,
  • 上傳者: 洪國恩,
  •  0
這是個滿特別的錯誤,雖然不是在我遇到的,不過記錄一下,以後遇到就知道怎麼解決囉!
 
PHP Warning: require_once(): Unable to allocate memory for pool. in .....
這是主要出現的錯誤訊息。從訊息上看起來不太知道問題是甚麼,因為即使把 php.ini 中的 memory_limit 加大也沒甚麼用處!
因為主要的問題是出現在 APC (Alternative PHP Cache) ,原因不明,但是解決方法很簡單,修改 apc.ini 即可.
; 確認產生 tmp 的路徑及規則
apc.mmap_file_mask=/tmp/apc.XXXXXX

; Shared memory 的大小
apc.shm_size=96M

; Cache 的存活時間
apc.ttl=3600

; User cache 的存活時間
apc.user_ttl=3600

; Garbage-collection 的時間
apc.gc_ttl=3600


 
修改完之後再重新啟動 httpd 就可以囉!
Facebook 討論區載入中...
資料夾 :
發表時間 :
2014-08-13 08:26:50
觀看數 :
3,663
發表人 :
洪國恩
部門 :
老洪的 IT 學習系統
QR Code :