Jobs::PeriodicalUpdates is the cause of high CPU (over 100%)

Jobs::PeriodicalUpdates is the cause of high CPU (over 100%)

When we check: sidekiq/scheduler/history

I see, Jobs::PeriodicalUpdates reached 79 secs. Causing the CPU to increase, users accessing the website are out.

Does turning off Jobs::PeriodicalUpdates have any effect? How to turn off?
And, Jobs::AboutStats ; Jobs::DestroyOldDeletionStubs ; Jobs::DirectoryRefreshDaily ; Jobs::EnsureDbConsistency
also causes CPU to go high above 100%

How do I resolve these errors?

What is your hardware, ram, SSD? How big is your database? How many posts?

we have about 600k topics.
400GB SSD, 16 core CPU. About Ram, I don’t see full.

I get these errors when I rebuild discourse (it was fine before rebuild).

1 Like

Hmm. That is odd. Maybe a bug.

Hope everyone helps.
Can anyone tell me:

in the Jobs::PeriodicalUpdates . task
What do you think this Jobs::PeriodicalUpdates means?
Is it possible to disable Jobs::PeriodicalUpdates?

I think this is the list of tasks used by this job: discourse/periodical_updates.rb at 1472e47aae5bfdfb6fd9abfe89beb186c751f514 · discourse/discourse · GitHub

I’m not an expert to analyse this, I see two settings mentionned

  • automatically download gravatars, I don’t thnink it would explain a high CPU usage
  • rebake_old_posts_count this one is now hidden, but maybe you did set up a lot of old posts to rebake every 15 minutes months ago. It would explain this cpu usage a bit more

I see, after 15 minutes, periodicupdates running.

If this is the cause, how can I turn off: rebake_old_posts_count ?

Was the the first upgrade on a long while? I think that you’re likely resizing images due to a change a while back. It’ll work out beeper long.

my last upgrade, was 2.7.x (I don’t remember the exact number of x)

hope someone can help me

You can’t turn it off. There have been changes that require a rebake. If you have enough resources you might be able to adjust things to improve performance.

1 Like

:slight_smile: I believe there is a way to handle the error,
It’s just that my level of technology is limited.

Did you run discourse-setup after this server had those resources? It may not be making the most use of your resources.

But I’m fairly certain that the jobs that it is doing need to be done, so you don’t want to turn them off.