Reduce the frequency (reduce the speed) of Onebox creation in Discourse

My forum is: Education.
A large number of readers (students) created Onebox,
As a result, our Sever CPU is overloaded, the website has 2 errors: 502 Bad Gateway and 504 Gateway Time-out error, unable to access the website.
I want to find the solution: Reduce the frequency (reduce the speed) of Onebox creation in Discourse (Onebox is still being generated, but the time it takes to create consecutive oneboxes will be longer).
If we can prolong the creation time of Oneboxs, then our server CPU will not be overloaded.
Thank you.

1 Like

The easiest thing is likely to increase the ram and or cpu on your server. What are your server specs? How many posts are created each day?


A large number of students make a lot of oneboxes, we have about 10000 students,
I also thought of solutions: Increase CPU, Ram,
However when we tested the CPU, the performance averaged between 25-45%; In some time, our Discourse gets CPU overload, resulting in inaccessibility to our website.
So I wanted another solution,
Jay Pfaffman, Thank you !!!


Did you adjust the memory parameters after adjusting the memory? It sounds like the database is your bottleneck. There are some topics about tuning large servers. That’s where to look.

You can look at the sidekiq queue and see if perhaps those jobs should be in a lower priority queue, but I think database tuning is probably where to look.