FastCGI 导致 Wordpress 内存耗尽

FastCGI 导致 Wordpress 内存耗尽

我在装有 Nginx 和 PHP 7.4 的 Ubuntu 20.04 服务器上运行了 Wordpress。尝试生成 feed(通过转到 feed URL,例如 /category/feed)时,收到以下错误:

2020/09/11 18:51:26 [error] 4446#4446: *5 FastCGI sent in stderr: "PHP message: PHP Fatal.    error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in /var/www/wp-includes/wp-db.php on line 1251PHP message: PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0PHP message: PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0" while reading response header from upstream, client: x.x.x.xx, server: www...., request: "GET /category/feed HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "www...."

我尝试将 PHP 的内存限制增加到 256M 以上,但这并不能解决问题。

可能是什么问题呢?

相关内容