# Troubleshooting severe performance issues with latest Discourse?

**URL:** https://meta.discourse.org/t/troubleshooting-severe-performance-issues-with-latest-discourse/182995
**Category:** Self-hosting
**Created:** [March 12, 2021, 10:40am UTC](https://meta.discourse.org/t/troubleshooting-severe-performance-issues-with-latest-discourse/182995 "2021-03-12T10:40:20Z")
**Posts on this page:** 11
**Page:** 2

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [April 1, 2021, 1:22pm UTC](https://meta.discourse.org/t/troubleshooting-severe-performance-issues-with-latest-discourse/182995/21 "2021-04-01T13:22:10Z")

</div>

Can you click on the miniprofiler icon there and show us the result?

---

<div class="post-metadata">

### Author: ![Sirshad](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@Sirshad](https://meta.discourse.org/u/Sirshad)
#### Post date: [April 1, 2021, 1:56pm UTC](https://meta.discourse.org/t/troubleshooting-severe-performance-issues-with-latest-discourse/182995/22 "2021-04-01T13:56:47Z")

</div>

![1](https://global.discourse-cdn.com/meta/original/3X/b/f/bf218a4fbfe82571d9801356c82da8231de0b63b.png) ![2](https://global.discourse-cdn.com/meta/original/3X/f/a/fa822dc57df116962386bf3ed737d805e902d9db.png) ![3](https://global.discourse-cdn.com/meta/original/3X/b/e/be6c88ba0546d9f7e7b3c87330d57345506e824e.png) ![4](https://global.discourse-cdn.com/meta/original/3X/e/a/ead500858fd7170b1ea57fec95c1de1168e956c8.png) ![5](https://global.discourse-cdn.com/meta/original/3X/d/7/d734022706f823af54032be1b2158a4258a6b075.png) ![6](https://global.discourse-cdn.com/meta/original/3X/8/7/87e28cd3ecf6cc8b280b05078ddf1bb5d6ba0288.png) ![7](https://global.discourse-cdn.com/meta/original/3X/0/b/0bc2ffa908d243e54897b9a4cfbada57d95a3c74.png)

I am attaching all 7 miniprofiler entries showing in the dropdown.

---

<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: [April 1, 2021, 4:09pm UTC](https://meta.discourse.org/t/troubleshooting-severe-performance-issues-with-latest-discourse/182995/23 "2021-04-01T16:09:22Z")

</div>

For better initial load performance you **need** HTTPS and HTTP/2. That comes pre-configured out of the box for every new install following our guide, but you will have to properly configure your reverse proxy for it.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [April 1, 2021, 4:39pm UTC](https://meta.discourse.org/t/troubleshooting-severe-performance-issues-with-latest-discourse/182995/24 "2021-04-01T16:39:24Z")

</div>

This looks like you have CPU contention:

![image](https://global.discourse-cdn.com/meta/optimized/3X/c/5/c5bc2a6182604f0ec31cc12406a758ccce2b1b32_2_690x62.png)

What processors do you have allocated on the server, how fast are they, and is there contention on the guest or host? That’s where I would start looking. Your time for the `latest.json` actions in the next two screenshots should be much quicker.

Additionally, with the performance headers enabled you’ll be able to see performance stats for each request in the response headers. Here’s an example for `/latest.json` for a small site:

```plaintext
x-runtime: 0.053864
x-redis-calls: 3
x-redis-time: 0.000615
x-sql-calls: 12
x-sql-time: 0.012697
x-queue-time: 0.001498

```

That might help you determine where you’re spending time waiting SQL/redis or doing processing in the app.

---

<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: [April 1, 2021, 4:42pm UTC](https://meta.discourse.org/t/troubleshooting-severe-performance-issues-with-latest-discourse/182995/25 "2021-04-01T16:42:10Z")

</div>

You can get a snapshot of the machine container activity at /admin/upgrade#/processes  
(all your processes, ordered by physical memory use, but including other stats)

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [April 1, 2021, 4:44pm UTC](https://meta.discourse.org/t/troubleshooting-severe-performance-issues-with-latest-discourse/182995/26 "2021-04-01T16:44:30Z")

</div>

Note that this will _only_ show you the processes inside the container; we are concerned with the entire machine as well as the VM host.

---

<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: [April 1, 2021, 4:48pm UTC](https://meta.discourse.org/t/troubleshooting-severe-performance-issues-with-latest-discourse/182995/27 "2021-04-01T16:48:08Z")

</div>

Thanks. See also the related topic [Downgraded deployment of Discourse](https://meta.discourse.org/t/downgraded-deployment-of-discourse/184855) which might be regarded as an attempt at a difficult workaround.

In the first miniprofiler snapshot above, I see ‘Redirect’ is costing 527ms. That seems a lot.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [April 1, 2021, 5:56pm UTC](https://meta.discourse.org/t/troubleshooting-severe-performance-issues-with-latest-discourse/182995/28 "2021-04-01T17:56:34Z")

</div>

I see this is an internal host and you’re accessing it by IP ?

---

<div class="post-metadata">

### Author: ![Sirshad](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@Sirshad](https://meta.discourse.org/u/Sirshad)
#### Post date: [April 2, 2021, 10:28am UTC](https://meta.discourse.org/t/troubleshooting-severe-performance-issues-with-latest-discourse/182995/29 "2021-04-02T10:28:55Z")

</div>

yes so far I am accessing it by IP. URL will be pointed to it once finalised for performance.

---

<div class="post-metadata">

### Author: ![Sirshad](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@Sirshad](https://meta.discourse.org/u/Sirshad)
#### Post date: [April 2, 2021, 1:11pm UTC](https://meta.discourse.org/t/troubleshooting-severe-performance-issues-with-latest-discourse/182995/30 "2021-04-02T13:11:27Z")

</div>

I have enabled the performance headers. Where does it show these results you mentions? in miniprofiler stats?

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [April 5, 2021, 4:44pm UTC](https://meta.discourse.org/t/troubleshooting-severe-performance-issues-with-latest-discourse/182995/31 "2021-04-05T16:44:00Z")

</div>

Those headers are in the HTTP response for each request.

[Previous page](https://meta.discourse.org/t/troubleshooting-severe-performance-issues-with-latest-discourse/182995.md?page=1)
