0

我遇到性能下降/网站无法访问的问题。最终用户看到 502 Bad gateway 错误。

行为是 php-fpm 可以正常工作几个小时,然后站点开始工作越来越慢,然后站点抛出 502 错误。我使用的唯一解决方案是重新启动 php -> /etc/init.d/php7.3-fpm restart。

我也知道这些参数 Emergency_restart_threshold 10 Emergency_restart_interval 1m process_control_timeout 10s

我之前设置的,但它仍然没有解决一个真正的问题。有时 Web 服务器会在 5-10 分钟内不可用。

我怀疑这是由 php-fpm 缓冲区溢出引起的,因为 Web 服务器抛出 502 - php fpm 仍在运行。但无法处理新请求。

请建议,任何帮助表示赞赏!

我用:

1. Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-1044-aws x86_64)
2. nginx/1.14.0 (Ubuntu)
3. php7.3-fpm

日志和配置:

1. php7.3-fpm.log
https://listhub-reports.s3.amazonaws.com/logs/php7.3-fpm-new.log.txt
I had to restart php manually due to 502 error at 30-Aug-2019 10:08:38

2. Syslog
https://listhub-reports.s3.amazonaws.com/logs/syslog.txt

3. PHP.ini
https://listhub-reports.s3.amazonaws.com/logs/php.ini.txt

4. PHP-FPM.conf
https://listhub-reports.s3.amazonaws.com/logs/php-fpm.conf.txt

5. WWW.conf
https://listhub-reports.s3.amazonaws.com/logs/www.conf.txt

如果您需要更多详细信息,请告诉我。

提前致谢!

4

0 回答 0