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.

demandé il y a un an270 vues
2 réponses
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
répondu il y a un an
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
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions