Error de carga extremo

“Due to extreme load, this is temporarily being shown to everyone as a logged out user would see it”

I run a website that features live threads during basketball games and have had issues with the server getting overloaded and showing this message during games (peak activity).

Is there any way to identify the best way to address the issue? Is it storage speed? Memory? CPU? Is there something I can do other than beefing up my server, or if I do during these times… what should I beef up?

2 Me gusta

Have fewer people use the forum? Better still would be to have them spread out their use rather than all doing it during the game.

But none of that is helpful. Since you know when the games are, you could beef up your server just during the game, or run multiple servers during the game behind a load balancer.

You need more and faster CPU cores and more Ram, so you can increase the number of web processes (Unicorn Workers) in order to deal with the peak traffic.

4 Me gusta

It is an area that @sam is actively working on. It does seem that newer versions of Discourse have regressed in this area, performance-wise.

That being said, the real solution is to use a live chat tool if you need live real time interactions for hundreds of people at the same time – though I continue to question how and why chat is “useful” when it’s scrolling so fast nobody can really see any of it, ala Twitch and YouTube streams. :man_shrugging:

2 Me gusta

This thread here describes the issue quite well.

This was my experience with a in match football forum before issues kicked in:

Digital Ocean
1 CPU 1 GB = 30 -40 users in chat like situation
2 CPUs and 2 GB= 70-80 users in chat like situation
4 CPUs and 8 GB = fine for 120 users and 1000 posts in 2 hours. Didn’t reach limit.

With Hetzner (Mirroring site)

My experience was:
3 CPU (CPX 21 AMD chip) and 4Gb = struggling with 20 users
2 CPU (Intel) and 8gb = no issue with 20 users.

I never got around to testing with more users.

The key thing is to improve the CPU and Ram. AND ALSO edit the app.yml file.

Add more unicrons in here, and also alter db_shared_buffers .

5 Me gusta

For sport forums it becomes closer to live text updates for games. People are not so much chatting (although it does occur to an extent, especially at half time), they are instead getting a live text commentary from fellow fans.

Many people will log onto the forum, just to read the live text. Seeing the thoughts and opinions of key match events by key people. Ranging from funny reactions to serious analysis.

If you missed the game, people log on, simply to read the event by event commentary. It great for people at work :wink: Its more personal/biased than the text commentary from Newspapers or TV channels.

6 Me gusta

That’s right. discourse-setup will do that if you run it on the upgraded server.

2 Me gusta

I hear you, it is something @sam @eviltrout and I have been looking at closely … the “hundreds of users logged in and browsing the same topic at the same time” situation has been coming up a fair bit recently as Discourse becomes more popular.

We may need to invite a new mode of behavior when this happens, “fast lane” signs should probably start appearing in the topic UI in some form… :warning:

4 Me gusta

An important thing to keep in mind here is that “chat” implementations generally broadcast the actual content to the subscribers.

In Discourse we have quite a complex pipeline which makes the naive implementation complex that leads to large amounts of traffic.

  1. User posts a reply
  2. All the users looking at the topic discover via broadcast that there is new content
  3. All users ask the server for post content (100 viewers = 100 requests)
  4. We pull images / optimize images
  5. All the users looking at the topic discover via broadcast that there is new content
  6. All users ask the server for post content (100 viewers = 100 requests)

(we have various optimisations, rate limits, retries and so on, but that is the gist)

These requests all have to run via our security pipeline to ensure the user has the rights to see the post and so on.

If the content was short-ish and we could somehow figure out how to do security in a more light-weight way for the “fast lane” then we could distribute the chatty messages via broadcast. This would lead to significantly better performance, we could probably handle 10000 users on a single low 2gb digital ocean droplet with that design.

Security is very complex. Caching is also complex cause of cache invalidation issues.

So, yes, we are absolutely thinking about this problem. But as it stands …

Lots of logged in viewers on one topic + lots of new content on one topic = expensive server bills.

7 Me gusta

Thats fantastic!

In all honesty I only have enough knowledge to be dangerous. I am the type of bloke who learns by playing (and breaking). Fully appreciate the fantastic effort in creating this platform. When I created my first forum 12 months back, I created 12 different versions :laughing: Vanilla, MyBB, SMF, Flarum etc. Discourse was easily the best.

One biggest pluses is the active development. Its great to see how you guys listen to the community and continually improve.

6 Me gusta

Do you have recommended settings for this?

1 me gusta

Hola chicos, mi sitio parece haber ido hacia atrás, con el mismo paquete de DO (8gb, 4CPUs), mi sitio está empezando a tener problemas con 60-70 usuarios publicando 1000 publicaciones.

Solo me pregunto dos cosas.

  • ¿Es posible eliminar el mensaje de carga extrema? Parece alarmar más a los usuarios que ser útil.

  • ¿Algún progreso en el manejo de un gran número de usuarios?

Mientras tanto, voy a explorar la modificación de los unicornios y la desactivación de complementos, etc., para ayudar a liberar recursos.

Si redimensionaste después de la instalación, ¿ejecutaste discourse-setup de nuevo o cambiaste la configuración manualmente?

Lo acabo de hacer manualmente, ¿debería haber ejecutado discourse setup?

Si realizaste las ediciones, necesitas reconstruir (no estoy seguro si un destroy/start será suficiente).

1 me gusta

Solo para asegurarme de que no estoy entendiendo mal, después de editar el yml, simplemente he ejecutado ./launcher rebuild app

¿Vale la pena que intente ./discourse-setup en su lugar?

(Como mencioné antes, tengo conocimientos suficientes para ser peligroso :sweat_smile:)

Debería estar bien. Discourse-setup cambiará la configuración de memoria por ti. Si lo hiciste, entonces deberías estar bien.

1 me gusta

Solo para asegurarme y por interés: ¿tienes configurado el intercambio?

Tengo un archivo de paginación de 2 GB, ¿recomendarían un archivo de paginación de 8 GB? (¿Igualar la cantidad de RAM?)

Si tienes espacio en disco, más swap no hará daño. free te dirá cómo se usa la memoria y cuánta swap se está utilizando.

1 me gusta