I am using LiteSpeed Web Server. It works great when used with the LiteSpeed Cache WordPress plugin. However, sometimes I see that the error.log is filled with the “Resume All Listeners” notice messages.

我正在使用LiteSpeed Web服务器。 与LiteSpeed Cache WordPress插件一起使用时,它可以很好地工作。 但是,有时我看到error.log中充满了“恢复所有侦听器”通知消息。

2019-10-22 14:11:09.999551 [NOTICE] [3490] Resume All Listeners
2019-10-22 14:11:10.493639 [NOTICE] [3490] Resume All Listeners

Here are some stats from the error logs.

以下是错误日志中的一些统计信息。

# grep -c "Resume All Listeners" error.log.2019_10_22
21086
# grep -c "Resume All Listeners" error.log.2019_10_21
483
# grep -c "Resume All Listeners" error.log.2019_10_22.01
157314

On a quick Google search, I landed on the LiteSpeed Wiki page. The gist of the page is following:

在Google的快速搜索中,我进入了LiteSpeed Wiki页面 。 该页面的要旨如下:

  • This notice starts appearing when the “Max Connections” limit is reached.当达到“最大连接数”限制时,该通知开始出现。
  • When it starts happening, the server will not serve few requests intermittently. So, you will not get to know about this issue at all unless you have some monitoring scripts in place.当它开始发生时,服务器将不会间歇性地处理几个请求。 因此,除非您有一些监视脚本,否则您将根本不会了解此问题。
  • There is no way to fix this issue, it will keep on growing and gradually all your sites will go down.没有解决此问题的方法,它会继续增长,并且逐渐您的所有站点都将关闭。
  • The only way to fix this issue is to restart the server.解决此问题的唯一方法是重新启动服务器。

I have kept the following settings for my LiteSpeed webserver.

我为LiteSpeed网络服务器保留了以下设置。

LiteSpeed Web Server Tuning Connections Settings

LiteSpeed Web服务器调整连接设置

These are very high numbers and my website traffic is not that much to cross this limit. Still, sometimes I see that my error.log file is getting filled with “Resume All Listeners” notice messages.

这些数字非常高,我的网站访问量并没有超过这个限制。 但是,有时我仍然看到我的error.log文件充满了“恢复所有侦听器”通知消息。

恢复所有侦听器错误的指标 (Indicators of Resume All Listeners Error)

  1. Reduced Traffic: I used Google Analytics to keep track of my website’s traffic. I have seen a drop of around 20% every time this error starts popping up.减少流量 :我使用Google Analytics(分析)来跟踪我的网站的流量。 每次开始出现此错误时,我都看到下降了20%。
  2. Website Monitoring Services: I use Uptime Robot to monitor downtime of my websites. If you get intermittent messages of downtime for your websites but when you check and everything is fine, it could be because of this.网站监视服务 :我使用Uptime Robot监视我的网站的停机时间。 如果您间歇性地收到有关网站停机的消息,但是当您检查并一切正常时,则可能是因为此。
  3. Website Not Loading Sometimes: If everything is fine and suddenly your website is not loading, and the issue is gone when you do refresh or in a couple of minutes, it could be because of this error.有时网站未加载 :如果一切正常,突然您的网站未加载,并且刷新或几分钟后问题不再存在,则可能是由于此错误。
  4. Readers’ Reaching Out: JournalDev is a popular website and many times I get messages from the users that my website is not loading. It’s always a good idea to quickly check the server error log to see if it’s happening randomly for some users because of listeners error.读者的支持 :JournalDev是一个受欢迎的网站,很多时候我收到用户的消息,表明我的网站未加载。 快速检查服务器错误日志以查看是否由于监听器错误而对某些用户随机发生的错误始终是一个好主意。

修复恢复所有侦听器错误 (Fix for Resume All Listeners Error)

We know that the only fix is to restart the server. We can’t manually check the servers all the time. That’s why I wrote a simple shell script to check for the “Resume All Listeners” in the error.log file and if it crosses a certain threshold value, then just restart the server.

我们知道唯一的解决方法是重新启动服务器。 我们不能一直手动检查服务器。 这就是为什么我编写了一个简单的Shell脚本来检查error.log文件中的“恢复所有侦听器”,并且如果它超过了某个阈值,则只需重新启动服务器即可。

Since a new error.log file is created on every server restart, we don’t have to worry about the earlier error messages.

由于每次服务器重新启动时都会创建一个新的error.log文件,因此我们不必担心早期的错误消息。

Here is the shell script that works for me.

这是对我有用的shell脚本。

lsws_restarts_script.sh

lsws_restarts_script.sh

#!/bin/bashresult=`/usr/bin/grep -c "Resume All Listeners" /usr/local/lsws/logs/error.log`
date_time=`date`echo $date_time $result >> /root/scripts/lsws_restarts_script_logs.log if [ $result -gt 100 ]
thenecho $date_time "Restarting LSWS Server" >> /root/scripts/lsws_restarts_script_restart_logs.logrestart_msg=`/usr/local/lsws/bin/lswsctrl restart`sleep 5echo $date_time $restart_msg >> /root/scripts/lsws_restarts_script_restart_logs.log
elseecho "All Seems Good" >> /root/scripts/lsws_restarts_script_logs.log
fi

I have set it to run every 2 minutes using the crontab command.

我已使用crontab命令将其设置为每2分钟运行一次。

*/2 * * * * /root/scripts/lsws_restarts_script.sh > /dev/null

Note: The script works fine on my Ubuntu server. If you are using any other OS, you might have to make slight changes to get it working.

注意 :该脚本在我的Ubuntu服务器上运行良好。 如果您使用任何其他操作系统,则可能必须进行一些更改才能使其正常运行。

结论 (Conclusion)

Now, I am not worried about the LiteSpeed not responding because of connection exhaustion. The script will take the necessary steps to restart the server. If you find the script helpful, do share it with others too.

现在,我不必担心LiteSpeed由于连接耗尽而无法响应。 该脚本将采取必要的步骤来重新启动服务器。 如果您认为该脚本有用,请也与他人共享。

翻译自: https://www.journaldev.com/33341/litespeed-web-server-resume-all-listeners-fix-workaround

LiteSpeed Web服务器“恢复所有侦听器”解决方法相关推荐

  1. 此计算机支持多个rdp侦听程序,远程桌面侦听器证书配置

    远程桌面侦听器证书配置 09/08/2020 本文内容 本文介绍在基于 Windows Server 2012 或基于 Windows Server 2012 的服务器上配置侦听器证书的方法,该服务器 ...

  2. vue修改计算属性的值_Vue语法高级之计算属性和侦听器

    计算属性和侦听器都可以监听到data区数据的变化,当数据变化时可以触发方法的调用,从而在方法内部可以进行相应的逻辑处理. 计算属性的语法格式是:computed: {} 侦听器的语法格式是:watch ...

  3. Vue:实例演示,v-if,v-for,v-model,v-bind,v-on,计算属性和侦听器属性

    Vue:实例演示,v-if,v-for,v-model,v-bind,v-on,计算属性和侦听器属性 一.实例演示,v-if,v-for,v-model,v-bind,v-on 方法 含义 v-bin ...

  4. 严重: 异常将上下文初始化事件发送到类的侦听器实例.[org.springframework.web.co

    原文 BeanFactory创建Bean实例错误,原因可能是项目的builderpath中的JDK版本莫名被调成默认的了,如javase1.5,重新移除添加系统的jdk即可. 2022.2.14 补充 ...

  5. 严重:异常将上下文初始化事件发送到类的侦听器实例.[org.springframework.web.context.ContextLoaderListener] 以解决

    严重: 异常将上下文初始化事件发送到类的侦听器实例.[org.springframework.web.context.ContextLoaderListener] org.springframewor ...

  6. ServletContextListener Servlet侦听器示例

    ServletContextListener is one of the many Servlet Listener we have. This is the fifth article in the ...

  7. SQL Server使用侦听器IP访问时遇到The target principal name is incorrect. Cannot generate SSPI context...

    SQL Server使用侦听器IP访问时遇到"The target principal name is incorrect. Cannot generate SSPI context&quo ...

  8. jpa加密_使用JPA侦听器的数据库加密

    jpa加密 最近,我不得不将数据库加密添加到一些字段中,并且发现了很多不好的建议. 建筑问题 最大的问题是建筑. 如果持久性管理器静静地处理您的加密,那么根据定义,您的体系结构将在持久性和安全性设计之 ...

  9. 使用JPA侦听器的数据库加密

    最近,我不得不将数据库加密添加到几个字段中,并且发现了很多不好的建议. 建筑问题 最大的问题是建筑. 如果持久性管理器悄悄地处理您的加密,那么根据定义,您的体系结构将在持久性和安全性设计之间要求紧密而 ...

最新文章

  1. 【数字信号处理】序列傅里叶变换 ( 傅里叶变换实例 | 矩形窗函数 | 傅里叶变换 | 傅里叶变换幅频特性 | 傅里叶变换相频特性 )
  2. CBOW模型的学习、Trainer类的实现
  3. 一句话概括自动装箱/拆箱
  4. 设计师必备超人气设计素材网站
  5. 公有云退款流程及政策--退款规则及退款流程(阿里云 华为云) --2020-09-03
  6. property练习
  7. 2019-0331视觉SLAM的学习第一讲
  8. 使用Vue做评论+localStorage存储(js模块化)
  9. oracle 快速入门之第一章 数据库基础
  10. 2020华为软挑成渝赛区初赛复赛方案分享
  11. 代码整洁之道:想要成为一个更好的程序员,你要注意这些方面
  12. php smarty 手册下载,smarty教程
  13. GB2312-80 所有汉字排序-拼音
  14. Java六种异常处理的陋习
  15. pytorch-Detach的作用
  16. 微信不显示王者荣耀连接服务器,王者荣耀省级不显示,王者荣耀不用微信怎么登录...
  17. Linux下C库函数到系统调用函数到内核函数调用的过程
  18. 港交所2012交易日列表
  19. 计算机农业类的sci,农学类比较好投的SCI期刊有哪些
  20. 计算机f8键的功能,f8键有什么作用(图文)

热门文章

  1. Delphi【变体记录及存储方式】
  2. 【洛谷3157】[CQOI2011] 动态逆序对(CDQ分治)
  3. 2018年9月28号-10月9号
  4. 微软Power BI 每月功能更新系列——3月Power BI 新功能学习
  5. bzoj2257瓶子与燃料——最大公约数
  6. Windows XP增强dos命令
  7. caffe学习日记--lesson5: VS下新建工程,探究Blob
  8. 机器学习:多变量线性回归
  9. 启动时不自动打开一个空文档
  10. VIO-为什么要进行在线时间标定