1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > 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)

时间:2019-08-16 01:48:14

相关推荐

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes)

内存已耗尽,这关系到PHP的memory_limit的设置问题

1.修改配置文件

~]# vi /etc/php7/php.inimemory_limit = 256M

2.重启

supervisorctl 进程管理

supervisorctlrestart uni-sysu-php-fpm:uni-sysu-php-fpm_00restart php-fpm-exporter:php-fpm-exporter_00

3.修改ulimit

ulimit为shell内建指令,可用来控制shell执行程序的资源

解除 Linux 系统的最大进程数和最大文件打开数限制

# 添加两行内容~]# vi /etc/security/limits.conf* soft nofile 100001* hard nofile 100002#退出当前终端

4.查看

-a 显示目前资源限制的设定

~]# ulimit -acore file size(blocks, -c) 0data seg size (kbytes, -d) unlimitedscheduling priority (-e) 0file size(blocks, -f) unlimitedpending signals (-i) 127958max locked memory (kbytes, -l) 64max memory size (kbytes, -m) unlimitedopen files (-n) 100001#查看该字段pipe size (512 bytes, -p) 8POSIX message queues(bytes, -q) 819200real-time priority (-r) 0stack size (kbytes, -s) 8192cpu time(seconds, -t) unlimitedmax user processes (-u) 127958virtual memory(kbytes, -v) unlimitedfile locks (-x) unlimited

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。