即使没有用户连接到Mysql,MYSQL也会突然使用CPU

发布于 2024-11-24 08:26:56 字数 309 浏览 1 评论 0原文

网站是电子商务网站:表中有 500 万条记录 两台服务器:一台用于 Web 服务器,另一台包含 mysql 搜索是通过 Sphinx 服务器进行的。因此搜索查询不会进入 MySQL

Mysql 配置:双四核 Zeoo 2.0、146 GB、16 GB RAM。 网络服务器配置:双四核 Zeoo 2.0、146 GB、16 GB RAM。

在过去的四天里,我发现 MySQL 每天至少连续使用 CPU 6-7 小时。之后就变得正常了。即使我重新启动,它也不会停止。它会在 2 到 3 分钟内再次使用 CPU。我什至尝试停止 Apache 并确保没有人连接到 Mysql。

Site is an ecommerce site: 5 Million records in table
Two servers: one for webserver and other contains mysql
Search is happenning through Sphinx server. So search queries do not come to MySQL

Mysql configuration: Dual Quad Core Zeoo 2.0, 146 GB, 16 GB RAM.
Webserver configuration: Dual Quad Core Zeoo 2.0, 146 GB, 16 GB RAM.

For past four days I find MySQL is using CPU continuously for at least 6-7 hours in a day. It becomes normal after that. Even if I restart, it doesnt stop. It again uses CPU in 2 to 3 mins. I even tried stopping Apache and made sure no one is connecting to Mysql.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

桃扇骨 2024-12-01 08:26:57

我刚刚注意到我的服务器上有同样的问题,并尝试对此采取一些措施。我升级了 mysql,它所做的只是减少了 CPU 使用量 - 从 100% 到 55%

认为我的问题与闰秒相关 - 我注意到你的问题是领先秒后 15 天。

我发现:
EC2 Amazon Linux AMI MySQL CPU @ 62% 空闲时?

这导致我:
为什么闰秒会导致问题?

最后我做了经典的窗口修复并重新启动 Linux 盒子 - 这有效(没有检查内核是否同时升级)

I just noticed the same issue on my server and tried to do something about it. I upgraded mysql and all it did was reduce the amount of CPU used - from 100% to 55%

I think my issue is Leap Second related - I notice your question is 15 days after the lead second.

I found:
EC2 Amazon Linux AMI MySQL CPU @ 62% When Idle?

Which lead me to:
Why Does the Leap Second Cause Problems?

Lastly I did the classic windows fix and rebooted the linux box - this worked (did not check if kernel had been upgraded in mean time)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文