# Extreme load error

**URL:** https://meta.discourse.org/t/extreme-load-error/180311
**Category:** Self-hosting
**Created:** [February 19, 2021, 6:16am UTC](https://meta.discourse.org/t/extreme-load-error/180311 "2021-02-19T06:16:09Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![dylanb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dylanb/32/139102_2.png) [@dylanb](https://meta.discourse.org/u/dylanb)
#### Post date: [February 19, 2021, 6:16am UTC](https://meta.discourse.org/t/extreme-load-error/180311/1 "2021-02-19T06:16:10Z")

</div>

“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?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 19, 2021, 3:19pm UTC](https://meta.discourse.org/t/extreme-load-error/180311/2 "2021-02-19T15:19:05Z")

</div>

> [@dylanb](#):
>
> Is there something I can do other than beefing up my server,

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.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [February 19, 2021, 3:45pm UTC](https://meta.discourse.org/t/extreme-load-error/180311/3 "2021-02-19T15:45:38Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 21, 2021, 3:04am UTC](https://meta.discourse.org/t/extreme-load-error/180311/4 "2021-02-21T03:04:47Z")

</div>

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. 🤷‍♂️

---

<div class="post-metadata">

### Author: ![Alec](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alec/32/137283_2.png) [@Alec](https://meta.discourse.org/u/Alec)
#### Post date: [February 21, 2021, 4:07am UTC](https://meta.discourse.org/t/extreme-load-error/180311/5 "2021-02-21T04:07:29Z")

</div>

This thread here describes the issue quite well.

> [@Real-time updating of topics freezes under high activity](https://meta.discourse.org/t/real-time-updating-of-topics-freezes-under-high-activity/166789/63):
>
> Perhaps so, but we would like to be slightly less protective over the server as the naturally occuring activity spikes are very short, and generally stabilize within a minute or so. So adjusting the thresolds just a little bit higher might improve the UX, while waiting for the move.

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 .

---

<div class="post-metadata">

### Author: ![Alec](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alec/32/137283_2.png) [@Alec](https://meta.discourse.org/u/Alec)
#### Post date: [February 21, 2021, 4:21am UTC](https://meta.discourse.org/t/extreme-load-error/180311/6 "2021-02-21T04:21:25Z")

</div>

> [@codinghorror](#):
>
> 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.

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 😉 Its more personal/biased than the text commentary from Newspapers or TV channels.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 21, 2021, 6:36am UTC](https://meta.discourse.org/t/extreme-load-error/180311/7 "2021-02-21T06:36:07Z")

</div>

> [@Alec](#):
>
> The key thing is to improve the CPU and Ram. **AND ALSO** edit the app.yml file.

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

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 21, 2021, 10:22pm UTC](https://meta.discourse.org/t/extreme-load-error/180311/8 "2021-02-21T22:22:33Z")

</div>

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… ⚠

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/d/cd7ad95f7a96239e749e7e8653560920b639561d.jpeg)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 21, 2021, 11:17pm UTC](https://meta.discourse.org/t/extreme-load-error/180311/9 "2021-02-21T23:17:47Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Alec](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alec/32/137283_2.png) [@Alec](https://meta.discourse.org/u/Alec)
#### Post date: [February 22, 2021, 5:58am UTC](https://meta.discourse.org/t/extreme-load-error/180311/10 "2021-02-22T05:58:14Z")

</div>

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 😆 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.

---

<div class="post-metadata">

### Author: ![dylanb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dylanb/32/139102_2.png) [@dylanb](https://meta.discourse.org/u/dylanb)
#### Post date: [February 22, 2021, 12:41pm UTC](https://meta.discourse.org/t/extreme-load-error/180311/11 "2021-02-22T12:41:40Z")

</div>

> [@Alec](#):
>
> 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 .

Do you have recommended settings for this?

---

<div class="post-metadata">

### Author: ![Alec](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alec/32/137283_2.png) [@Alec](https://meta.discourse.org/u/Alec)
#### Post date: [August 11, 2023, 10:58pm UTC](https://meta.discourse.org/t/extreme-load-error/180311/12 "2023-08-11T22:58:48Z")

</div>

> [@Alec](#):
>
> 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 .

Hey guys, my site seems to have gone backwards, with the same DO package (8gb, 4CPUs) , my site is starting to struggle at 60-70 users posting 1000 posts.

Just wondering two things.

- Is it possible to remove extreme load message ? It seems to alarm users more than being helpful.

- Any progress with dealing with large number of users ?

In meantime going to explore modifying unicorns, and disabeling plug-ins etc to help free up resources.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 12, 2023, 12:02am UTC](https://meta.discourse.org/t/extreme-load-error/180311/13 "2023-08-12T00:02:41Z")

</div>

If you resized after installation did you run discourse-setup again or change the settings by hand?

---

<div class="post-metadata">

### Author: ![Alec](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alec/32/137283_2.png) [@Alec](https://meta.discourse.org/u/Alec)
#### Post date: [August 12, 2023, 12:05am UTC](https://meta.discourse.org/t/extreme-load-error/180311/14 "2023-08-12T00:05:03Z")

</div>

I have just done it by hand, should I have run discourse setup ?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 12, 2023, 12:06am UTC](https://meta.discourse.org/t/extreme-load-error/180311/15 "2023-08-12T00:06:14Z")

</div>

If you made the edits you need to rebuild (not sure if a destroy/start will do it).

---

<div class="post-metadata">

### Author: ![Alec](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alec/32/137283_2.png) [@Alec](https://meta.discourse.org/u/Alec)
#### Post date: [August 12, 2023, 12:26am UTC](https://meta.discourse.org/t/extreme-load-error/180311/16 "2023-08-12T00:26:14Z")

</div>

So just making sure I am not misunderstanding, after editing yml I have simply done ./launcher rebuild app

Is it worth me trying ./discourse-setup instead ?

(As mentioned before, I have just enough knowledge to be dangerous 😅)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 12, 2023, 1:14am UTC](https://meta.discourse.org/t/extreme-load-error/180311/17 "2023-08-12T01:14:37Z")

</div>

Should be fine. Discourse-setup will change the memory settings for you. If you did it then you should be fine.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [August 12, 2023, 5:01am UTC](https://meta.discourse.org/t/extreme-load-error/180311/18 "2023-08-12T05:01:35Z")

</div>

Just to make sure and out of interest: do you have swap configured?

---

<div class="post-metadata">

### Author: ![Alec](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alec/32/137283_2.png) [@Alec](https://meta.discourse.org/u/Alec)
#### Post date: [August 13, 2023, 1:02am UTC](https://meta.discourse.org/t/extreme-load-error/180311/19 "2023-08-13T01:02:44Z")

</div>

I have a 2gb swap file, would you guys recommend a 8gb swap file ? (match up with amount of ram ?)

---

<div class="post-metadata">

### Author: ![Ed\_S](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ed_s/32/134015_2.png) [@Ed\_S](https://meta.discourse.org/u/Ed_S)
#### Post date: [August 13, 2023, 9:54am UTC](https://meta.discourse.org/t/extreme-load-error/180311/20 "2023-08-13T09:54:41Z")

</div>

If you have the disk space, more swap will do no harm. `free` will tell you how memory is used and how much swap is used.
