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.
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.
我们也遇到了同样的问题,sidekiq (low) 运行速度很快,导致我们的 discourse 无法访问网站。
有没有办法调整 sidekiq (low) 的频率?
我认为您的选择是添加 CPU 和 RAM,或者限制用户可以创建的链接数量。
我的问题差不多,
在 Sidekiq 中,如何降低 Sidekiq 的运行频率。
下图:
我们想降低 Sidekiq 中 Low 的运行频率。
因为 Sidekiq 中的 Low 运行得太快(频率很高),导致网站出错,读者无法访问网站(502、504)。
我想指定 Sidekiq:Sidekiq (Low) 每次只允许运行多少请求/秒。
你能帮我吗?
对我来说,CPU 和内存占用不高。
我的 sidekiq 运行得太快了。导致网站崩溃。
据我所知,sidekiq 是不可自定义的。
根据您显示的这些数字,我建议您升级服务器,增加内存和进程。
查看 Sidekiq 产品级别功能图,有两点引人注目:
-
Discourse 免费捆绑的基础 OSS 套餐缺少:
- 速率限制(我认为这就是您想要的?)
- 批处理(您可能会使用它在非高峰时段处理那些可以推迟的工作)
因此,我认为您需要关注硬件方面。
然而,了解一些站点是否可以升级到 Pro 以及涉及多少工作(仅仅是添加许可证密钥吗?)会很有趣。也许有人以前尝试过?
Pro 产品价格不菲,每月 99 美元。这是否意味着应该在硬件上投入更多?即使每月 50 美元也能为您带来显著的硬件升级?您现在花费多少?
如果您想了解在 Discourse 中使用 Pro 产品,Pavilion 可以帮助您,但咨询也会产生费用。
当然,还有一种选择是找人为您托管,并处理所有这些挑战。
我认为您需要大幅增加预算才能按照您想要的方式运行系统。
您能提供一些数据吗?每个回复有多少个 onebox,每个主题有多少个回复,以及每个主题总共有多少个 onebox?
