Server Performance Issues Due to High CPU Usage

I’ve received some complaints from users who occasionally can’t post or create topics. This issue seems to occur randomly, but it may be related to high CPU usage on the server.

Here’s a snapshot from htop showing the CPU usage during one of these spikes.

Each time the CPU usage spikes, I notice the following command running:
postgres:13/main: discourse discouse [local] UPDATE

This occurs every hour (more or less):

Additionally, we’re seeing an increase in logs around the same times, usually coinciding with high CPU usage.

Could this be a memory or CPU limitation on the server? If anyone has insights into diagnosing or resolving this, I would greatly appreciate your help. Thank you in advance!

2 Likes

Update:
After upgrading the server, the issue seems to have been minimized.

However, the sames errors still occur every hour while the postgres:13/main: discourse discourse [local] UPDATE command is running, which corresponds to the spikes in the chart.

Does anyone have suggestions on what might be causing this and how to resolve it?

2 Likes

Same problem here. Almost once every hour you are not able to post anything for 15 to 20 minutes, with a “502 error”.

I don’t know what’s not working

1 Like

Did you recently upgrade?
Anyhow… here are a couple recent threads with high cpu usage
rebuilding may help

2 Likes

I did upgrade recently and the same problem appears quite often, every hour or so, as before.

Thank you for sharing those threads, will take a look! :+1:

1 Like