我在 Debian 机器上运行 LAMP-Stack 已经有一段时间了。我按照自己习惯的方式配置它,从未出现过奇怪的网络或内存问题。
在随机的日期和时间,我都会收到来自 monit.d 的大量邮件,内容涉及 mysql、exim、ssh 的连接错误以及超出 CPU 使用率限制。monit-log 显示大量“无可用缓冲区”。
我不知道有任何事件可以引发这种情况,而且这种情况发生在随机的日期和时间。
你知道我该如何解决这个问题吗?
先感谢您!
程式:
- 阿帕奇2
- php7-fpm
- mysqld
- 监控工具
- 穆宁
CPU 负载通常低于 5%,RAM 使用率低于 50%。服务器用于内部云,白天有 5-10 个活跃用户。
monit.d 日志的一部分:
[CET Jan 27 22:57:38] error : Connection failed -- No buffer space available
[CET Jan 27 22:57:38] error : Cannot open a connection to the mailserver '127.0.0.1:25' -- No buffer space available
[CET Jan 27 22:57:38] error : Sendmail: No mail servers are available
[CET Jan 27 22:57:38] error : Alert handler failed, retry scheduled for next cycle
[CET Jan 27 22:57:38] error : 'localhost' cpu system usage of 75.1% matches resource limit [cpu system usage>30.0%]
[CET Jan 27 22:57:38] error : 'localhost' loadavg(5min) of 3.1 matches resource limit [loadavg(5min)>2.0]
[CET Jan 27 22:57:38] error : Connection failed -- No buffer space available
[CET Jan 27 22:57:38] error : socket_create: Could not create socket -- No buffer space available
[CET Jan 27 22:57:38] error : 'apache2' failed, cannot open a connection to INET[localhost:80] via TCP
[CET Jan 27 22:57:38] error : Connection failed -- No buffer space available
[CET Jan 27 22:57:38] error : socket_create: Could not create socket -- No buffer space available
[CET Jan 27 22:57:38] error : 'mysql' failed, cannot open a connection to INET[127.0.0.1:3306] via TCP
[CET Jan 27 22:57:38] info : 'mysql' trying to restart
[CET Jan 27 22:57:38] info : 'mysql' stop: /etc/init.d/mysql
[CET Jan 27 22:57:41] info : 'mysql' start: /etc/init.d/mysql
[CET Jan 27 22:57:46] error : Connection failed -- No buffer space available
[CET Jan 27 22:57:46] error : socket_create: Could not create socket -- No buffer space available
[CET Jan 27 22:57:46] error : 'exim4' failed, cannot open a connection to INET[localhost:25] via TCP
[CET Jan 27 22:57:46] info : 'exim4' trying to restart
[CET Jan 27 22:57:46] info : 'exim4' stop: /etc/init.d/exim4
[CET Jan 27 22:57:46] info : 'exim4' start: /etc/init.d/exim4