Rate limit problem


(Kaoff) #1

Hey there :slight_smile:

I’m trying to develop a dashboard in which members of our team can see and validate tasks directly.

But I got a “Too Many Request” error while loading my topics.

Is there any way to bypass this limit ?

Cheers,
Bastien.


(Ivan Rapekas) #2

You may add this code to /var/discourse/containers/app.yml into run section:

    - exec:
         cmd:
           - sed -i 's/limit_conn connperip 20/limit_conn connperip 20000/g' /etc/nginx/conf.d/discourse.conf
           - sed -i 's/limit_req zone=flood burst=12/limit_req zone=flood burst=12000/g' /etc/nginx/conf.d/discourse.conf
           - sed -i 's/limit_req zone=bot burst=100/limit_req zone=bot burst=100000/g' /etc/nginx/conf.d/discourse.conf

Then rebuild app. This will replace default limits x1000 times. Not sure, but also you may need to increase values for Rate Limits /admin/site_settings/category/rate_limits in forum settings.


(Kaoff) #3

Thanks, I’ll try that. :slight_smile:

EDIT : Nope. Doesn’t work. :frowning:

We’re currently checking with @Shauni what is the problem. :wink:


(Shauni) #4

Is there a way to simply disable Nginx’ rate limiting ?

Not fully secure, but we are in a closed environment… So it can make the work done for the moment.

Thanks for your help !


(Ivan Rapekas) #5

You may change nginx limits on working docker.

  1. Enter your app: /var/discourse/launcher enter app
  2. Edit nginx config using nano or vim vim /etc/nginx/conf.d/discourse.conf, set limits at the top of the file.
  3. Exit from app back to OS: press Ctrl+d or type exit
  4. Restart nginx: docker exec app nginx -s reload
    Now your forum has new limits.

These limits will be reset to defaults on next rebuild. To set permanent limits, edit app.yml as described above.


(Kaoff) #6

Hey there.

We tried to comment all rate limit lines, it did nothing. :confused:

Isn’t there a way to just disable Nginx limits ?