首页 > Nginx > nginx打开网站提示 500错误解决方案 ([error] 1824#100074: *6 FastCGI sent in stderr: “PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4194337 bytes) )
2016
10-19

nginx打开网站提示 500错误解决方案 ([error] 1824#100074: *6 FastCGI sent in stderr: “PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4194337 bytes) )

wordpress 博客突然打不开了,查看一下 nginx 日志

# cat /var/log/nginx/error.log
2016/10/19 09:21:13 [error] 1824#100074: *6 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 4194337 bytes) in /usr/local/www/nginx-dist/mydoop.com/wp-includes/wp-db.php on line 1321" while reading response header from upstream, client: 123.157.210.26, server: mydoop.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.mydoop.com"
2016/10/19 09:22:39 [error] 1824#100074: *11 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 4194337 bytes) in /usr/local/www/nginx-dist/mydoop.com/wp-includes/wp-db.php on line 1321" while reading response header from upstream, client: 123.157.210.26, server: mydoop.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.mydoop.com"

大概的意思是 wordpress 的 wp-db.php 把php默认设置的 128M内存用完了

编辑php.ini

把 memory_limit = 128M 修改成 memory_limit = 256M

然后重起一下nginx 解决!

最后编辑:
作者:dnybz
这个作者貌似有点懒,什么都没有留下。