429 too many requests good or bad ? (please help)

hello

i am using uptimerobot and a few times a week i get 429 for 1-5 minutes but thats what i see on the logs.

Root cause
HTTP 429 - Too Many Requests
Incident started at
2026-08-23 10:42:58
Resolved at
2026-08-23 10:48:05
Duration
5 minutes and 7 seconds
Location
Ashburn, USA - IP 5.161.75.7

im self hosted and discourse is with reverse proxy from hestiacp

log.txt (55.8 KB) here is the log

id like to know if this 429 was for all users or just few ?

im on standard install on docker with only port 80 and 4 workers.

8 gb ram and 8 cores

update: did a test on my pc while opening 20/30 posts until i got 429 and on my phone with different network it worked fine. this confirms 429 gets one client and not all visitors ?

If I’m not wrong, yes, it only affects the client sending the flurry of requests.

should i ignore this or i should change something to increase the limit ?

If you want to adjust the thresholds, see:

that probably means that all requests appear to be coming from the same IP and lots of users are getting 429 errors. Go to admin/users and look at what IP address you see for yourself and another user. If they are the same then you need to configure things so that the real IP gets to Discourse.

just checked and i have the same internal ip as the other users ! :frowning:

how can i fix this ?

Are you running behind cloudflare?

I am going through this game as well :slight_smile:

yes, but the problem is that all users have the same ip..

added this to app.yml and im testing right now

run:

  • replace:
    filename: /etc/nginx/conf.d/discourse.conf
    from: “server {”
    to: |
    server {
    set_real_ip_from 192.168.1.250;
    real_ip_header X-Forwarded-For;
    real_ip_recursive on;
  • exec: echo “Beginning of custom commands”
  • exec: echo “End of custom commands”

tested right now from desktop and mobile phone

i get correct ip adresses :smiley:

If you’re using Cloudflare then you want the Cloudflare template. It seems to be impossible to find the canonical topic about that, so maybe try https://ask.discourse.com/ – I was able to get an AI-generated message about what to do, but not where to find the discussion about it. It makes me sad that AI finds the solution but search won’t. :crying_cat:

well.. yeah asked chatgpt , made a backup before and then did a test. so far so good :smiley:

I would always use https://ask.discourse.com/ rather than a generic AI (unless you’re actively coding and the AI has access to the Discourse code).

Would that be this part?

  1. For Cloudflare, add cloudflare.template.yml to your app.yml file.

this is an alternative to the solution i found above ?

If you use Cloudflare with Discourse, you should add that. I think that was the template @pfaffman mentioned?

I think it depends on your setup.

I have

             ┌─────────────────────────┐
             │       Cloudflare        │
             │ WAF / CDN / DDoS / SSL  │
             └────────────┬────────────┘
                          │
                   real client IP
                          │
                          ▼
             ┌─────────────────────────┐
             │   CentminMod Nginx      │
             │                         │
             │ cloudflare.conf         │
             │ restores real IP        │
             └────────────┬────────────┘
                          │
                   X-Forwarded-For
                   = real client IP
                          │
                          ▼
             ┌─────────────────────────┐
             │    Discourse Docker     │
             │                         │
             │ trusted proxy           │
             │ 172.16.0.0/12           │
             └─────────────────────────┘

If I use the template it reverts the IP to docker IP not the exposed one. I forward this in nginx.