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.

asked a year ago257 views
2 Answers
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
EXPERT
answered a year ago
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
EXPERT
Steve_M
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions