遇到LSPHP进程不断重启导致网站加载很慢的解决办法

遇到LSPHP进程不断重启导致网站加载很慢的解决办法插图

最近搬主题发现网站突然变得有点慢,有时候会丢失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

重启后,观察了一下,没有这类问题出现了。

 收藏 (0) 更新不易,打赏吧

您可以选择一种方式赞助本站

支付宝扫一扫赞助

微信钱包扫描赞助

除特别注明外,本站所有文章均基于CC-BY-NC-SA 4.0原创,转载请注明出处。
文章名称:《遇到LSPHP进程不断重启导致网站加载很慢的解决办法》
文章链接:https://www.banzhuti.com/lsphp-detect-restart-request-stopping.html
分享到: 生成海报
版权免责声明

① 本站提供的资源(插件或主题)均为网上搜集,如有涉及或侵害到您的版权请立即通知我们。
② 本站所有下载文件,仅用作学习研究使用,请下载后24小时内删除,支持正版,勿用作商业用途。
③ 因代码可变性,不保证兼容所有浏览器、不保证兼容所有版本的WP、不保证兼容您安装的其他插件。
④ 本站保证所提供资源(插件或主题)的完整性,但不含授权许可、帮助文档、XML文件、PSD、后续升级等。
⑤ 由本站提供的资源对您的网站或计算机造成严重后果的本站概不负责。
⑥ 使用该资源(插件或主题)需要用户有一定代码基础知识!另本站提供汉化使用安装教程,仅供参考。
⑦ 有时可能会遇到部分字段无法汉化,同时请保留作者汉化宣传信息,谢谢!
⑧ 本站资源售价只是赞助和汉化辛苦费,收取费用仅维持本站的日常运营所需。
⑨ 如果喜欢本站资源,欢迎捐助本站开通会员享受优惠折扣,谢谢支持!
⑩ 如果网盘地址失效,请在相应资源页面下留言,我们会尽快修复下载地址。

热门文章

评论 抢沙发

评论前必须登录!

立即登录   注册

WordPress主题 插件 建站 汉化

定制服务联系我们
切换注册

登录

点击按钮进行验证

忘记密码

切换登录

注册

我们将发送一封验证邮件至你的邮箱, 请正确填写以完成账号注册和激活