CPU peaks, website goes down right after publishing a post


I have a few Ghost websites hosted with DigitalOCean’s 1-click deployment.

Lately, I have noticed that CPU consumption peaks right after publishing a post. This results in slow loading to the website going down momentarily. Things go back to normal after a few minutes.

Here are the stats from Digial Ocean. You can see CPU peaking and load average spiking as soon as the post is published.

When I first noticed on one website, I increased the server to have 2-core vCPU instead of 1. The problem still persists. I use dedicated, high performance CPU option in Digital Ocean.

I have started noticing this issue on 2 other Ghost installs as well.

Anyone else encountering this issue?

What could be the solution? I don’t want to increase the server configuration to 4 core or 8 core just to survive the temporary spike.

Are you “Publishing to email”? How many subscribers?

I have encountered it for both normal and neesletter posts.

Before you press send, log into the server and start a live tail of the logs:

journalctl -f -u '*ghost*'

And maybe in a second terminal window, run htop during the publish process.

  • Is thing anything interesting in the logs during this time?
  • Does the memory ever reach 100%?

The top command always shows node taking too much CPU.

Memory consumption also increases but don’t reach 100%.

And what do the Ghost logs show during this time?

Which version of Ghost are you running?

The latest one at the moment 5.49 but the problem was persistent in older versions too.

Will share when I have successfully captured the logs :slight_smile: