CPU Spike Happens on Lightsail Server Every 3 Days (exactly)

0

I host about 36 WordPress websites on a Lightsail server. I've noticed a pattern that every 3 days (exactly) at 4pm, my server spikes to around 97% CPU for around an hour, then drops back down to around 30%. When this happens, I log into the server via SSH and run the "top" command, but I only see about five or six of my sites running php-ftm without any one site being an obvious source of the spike. Any idea what might be causing this? Has anyone else experienced something similar? Thanks in advance.

已提问 6 个月前164 查看次数
2 回答
0

Hello.

Do you have any Cron or WordPress modules installed that run some script every 3 days?
If something is running every 3 days, that may be the cause.

profile picture
专家
已回答 6 个月前
0

It would be worth checking any scheduled jobs that run at 4pm every third day in the Linux cron scheduler (or perhaps you're using systemd.timer ). Is the system clock on the Lightsail server set to your local timezone, and if it isn't then what time is it in the system's clock when this happens?

If I've understood correctly, the fact that it's happening every three days means it's not tied to a particular day of the week (Monday -> Thursday -> Sunday -> Wednesday -> Saturday -> Tuesday -> Friday -> Monday) and happens just as regularly on weekends as during the working week. Is there anything that uploads new content to one of the websites at three day intervals?

It would be useful to put CloudWatch Agent on there and see what the more detailed metrics tell you. It may show other forms of resource contention happening too (e.g. memory or network) which may help point towards the root cause https://repost.aws/knowledge-center/lightsail-monitor-with-cloudwatch

profile picture
专家
Steve_M
已回答 6 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则