一个插件引发的 php-fpm index.php executing too slow 问题与解决

2021-02-01T16:21:00

今天打开我的网站首页感觉有点不对劲,于是就点了文章一下,结果页面完全打不开。
点开宝塔后台一看,我的 VPS 负载已经爆掉了。
我当然首先想到的是木马入侵。
于是终端输入top命令后没有发现其他奇怪的进程。
但是php-fpm有多个进程在运行,应该就它把 VPS 干爆的。
于是宝塔打开 PHP7.3 的日志查看。
发现错误提示如下:

[01-Feb-2021 13:27:23] WARNING: [pool www] child 2746 exited on signal 15 (SIGTERM) after 159.963112 seconds from start
[01-Feb-2021 13:27:23] NOTICE: [pool www] child 2879 started
[01-Feb-2021 13:27:34] NOTICE: Finishing ...
[01-Feb-2021 13:27:34] NOTICE: exiting, bye-bye!
[01-Feb-2021 13:27:35] NOTICE: fpm is running, pid 2899
[01-Feb-2021 13:27:35] NOTICE: ready to handle connections
[01-Feb-2021 13:28:25] WARNING: [pool www] child 2900, script '/www/wwwroot/blog/index.php' (request: "GET /index.php") executing too slow (39.377066 sec), logging
[01-Feb-2021 13:28:25] NOTICE: child 2900 stopped for tracing
[01-Feb-2021 13:28:25] NOTICE: about to trace 2900
[01-Feb-2021 13:28:25] NOTICE: finished trace of 2900
[01-Feb-2021 13:31:55] WARNING: [pool www] child 2902, script '/www/wwwroot/blog/index.php' (request: "GET /index.php") executing too slow (33.385841 sec), logging
[01-Feb-2021 13:31:55] NOTICE: child 2902 stopped for tracing
[01-Feb-2021 13:31:55] NOTICE: about to trace 2902
[01-Feb-2021 13:31:55] NOTICE: finished trace of 2902
[01-Feb-2021 13:33:45] WARNING: [pool www] child 2903, script '/www/wwwroot/blog/index.php' (request: "GET /index.php") executing too slow (38.478471 sec), logging
[01-Feb-2021 13:33:45] NOTICE: child 2903 stopped for tracing
[01-Feb-2021 13:33:45] NOTICE: about to trace 2903
[01-Feb-2021 13:33:45] NOTICE: finished trace of 2903
[01-Feb-2021 13:34:55] WARNING: [pool www] child 2900, script '/www/wwwroot/blog/index.php' (request: "GET /index.php") executing too slow (33.277881 sec), logging
[01-Feb-2021 13:34:55] NOTICE: child 2900 stopped for tracing
[01-Feb-2021 13:34:55] NOTICE: about to trace 2900
[01-Feb-2021 13:34:55] NOTICE: finished trace of 2900

看到日志都是这一个网站的错误,于是就尝试了其他 php 网站,发现运行正常。
只好动用万能的谷歌,结果也没有搜到有用的东西,于是只好用维修三步法尝试了。

  1. 重启
  2. 重装
  3. 重买

我重启了服务器不行,于是重装 PHP7.3 也不行。
最终只能一个版本一个版本的退我网站的备份,发现很早之前的备份是正常使用的。
于是一个一个还原插件。还原到 MenuTree 时发现网站又炸了,原来这就是罪魁祸首,我都准备都不行的话就去再买个空间放这个网站了。 :???:

当前页面是本站的「Baidu MIP」版。发表评论请点击:完整版 »