最近搬主题发现网站突然变得有点慢,有时候会丢失PHP进程会话,不懂哪里出了问题。虽然网站还是正常运行,总感觉不爽,于是搬主题检查了一下日志,发现一个问题。日志里有大量的LSPHP进程不断重启的记录,如下
2022-01-18 12:25:09.089358 [INFO] [753246] [LSPHP] detect restart request, stopping ...
2022-01-18 12:25:19.026103 [INFO] [753246] [LSPHP] detect restart request, stopping ...
2022-01-18 12:25:29.061187 [INFO] [753246] [lsPHP] detect restart request, stopping ...
2022-01-18 12:25:39.010827 [INFO] [753246] [lsPHP] detect restart request, stopping ...
2022-01-18 12:25:49.003068 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:25:59.008744 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:26:09.046763 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:26:19.003400 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:26:29.049794 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:26:39.090653 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:26:49.029251 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:26:59.088360 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:27:09.058919 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:27:19.094686 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:27:29.009170 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:27:39.066870 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:27:49.062644 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:27:59.040132 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:28:09.078349 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:28:19.046406 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:28:29.020600 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:28:39.099785 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:28:49.017589 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:28:59.079596 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:29:09.088982 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:29:19.064147 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:29:29.043597 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:29:39.013439 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:29:49.046521 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:29:59.037448 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:30:09.002008 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:30:19.035069 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:30:29.046636 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:30:39.078811 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:30:49.061091 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:30:59.008919 [INFO] [753246] [lsphp] detect restart request, stopping ...
2022-01-18 12:31:09.050965 [INFO] [753246] [lsphp] detect restart request, stopping ...
也就是每隔10秒钟就会接收到LSPHP进程要重启的请求,然后重新启动。因为搬主题使用的是LSPHP分离模式,因此不会对网站造成影响,也就是重启后自动启动,所以网站基本没有影响。
但是这是什么问题造成的呢?
经过搬主题的分析,应该是不断重新重启LSPHP进程的时候,如果有各类PHP的请求的话,那网站自然要等PHP进程启动完成后才能回应各类请求了,所以网站会出现偶尔缓慢的情况。
那到底是哪里会造成LSPHP进程不断重启的请求呢?
经过判断,搬主题分析应该是前几天升级了依赖软件包,所以升级完后,应该有重启进程的请求,但是因为某些原因导致没有重启成功,然后一直出现这个请求。
于是,搬主题使用重启LSWS的命令
systemctl restart lsws.service
重启后,观察了一下,没有这类问题出现了。
1.本站内容仅供参考,不作为任何法律依据。用户在使用本站内容时,应自行判断其真实性、准确性和完整性,并承担相应风险。
2.本站部分内容来源于互联网,仅用于交流学习研究知识,若侵犯了您的合法权益,请及时邮件或站内私信与本站联系,我们将尽快予以处理。
3.本文采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权
4.根据《计算机软件保护条例》第十七条规定“为了学习和研究软件内含的设计思想和原理,通过安装、显示、传输或者存储软件等方式使用软件的,可以不经软件著作权人许可,不向其支付报酬。”您需知晓本站所有内容资源均来源于网络,仅供用户交流学习与研究使用,版权归属原版权方所有,版权争议与本站无关,用户本人下载后不能用作商业或非法用途,需在24个小时之内从您的电脑中彻底删除上述内容,否则后果均由用户承担责任;如果您访问和下载此文件,表示您同意只将此文件用于参考、学习而非其他用途,否则一切后果请您自行承担,如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。
5.本站是非经营性个人站点,所有软件信息均来自网络,所有资源仅供学习参考研究目的,并不贩卖软件,不存在任何商业目的及用途
暂无评论内容