PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes)
生活随笔
收集整理的這篇文章主要介紹了
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes)
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
內(nèi)存已耗盡,這關(guān)系到PHP的memory_limit的設(shè)置問題
1.修改配置文件
~]# vi /etc/php7/php.ini memory_limit = 256M2.重啟
supervisorctl???? 進程管理
supervisorctl restart uni-sysu-php-fpm:uni-sysu-php-fpm_00 restart php-fpm-exporter:php-fpm-exporter_003.修改ulimit
ulimit為shell內(nèi)建指令,可用來控制shell執(zhí)行程序的資源
解除 Linux 系統(tǒng)的最大進程數(shù)和最大文件打開數(shù)限制
# 添加兩行內(nèi)容~]# vi /etc/security/limits.conf * soft nofile 100001 * hard nofile 100002#退出當前終端?4.查看
-a 顯示目前資源限制的設(shè)定
~]# ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 127958 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 100001 #查看該字段 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 127958 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited總結(jié)
以上是生活随笔為你收集整理的PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: windows server 2012多
- 下一篇: 记录一个ansible高级用法与shel