429 fout met api

AI-generated summary

Users are troubleshooting HTTP 429 errors while running migration scripts on a Discourse instance hosted on an Azure Linux VM. jsouthall reports hitting rate limits despite adjusting app.yml and rebuilding the app. sam suggests the issue may stem from NGINX rate limiting. ciprian confirms modifying /etc/nginx/conf.d/discourse.conf with higher limits but still encounters 429 errors, specifically the message: “You’ve reached the maximum number of new topics. Please wait 15 hours before trying again.” They later discover the relevant setting under Settings > Rate Limits ciprian. pfaffman advises using existing Discourse import scripts instead of custom migration scripts for better compatibility and to avoid rate-limiting issues. The issue appears to be primarily Discourse’s internal rate limits, not NGINX, especially affecting topic creation by specific users.

Hi All
I have stood up a simple linux vm in azure and installed discourse. I am using this machine to develop some migration scripts. I am running in to http 429 errors when running the migration scripts. I found the post how to set the limits in app.yml

my configurations are as follows:

i have also “./launcher rebuild app” after these changes.

but still i am getting 429 errors at around 200 api requests. what could i be missing here?

Probably coming from NGINX, are you mixing in the NGINX rate limiting template?

we’ve tried to make changes in /etc/nginx/conf.d/discourse.conf – we have adjusted these values hoping of not getting any more 429 (“too many requests”):

limit_req_zone $binary_remote_addr zone=flood:10m rate=1200r/s;
limit_req_zone $binary_remote_addr zone=bot:10m rate=2000r/m;
limit_req_status 429;
limit_conn_zone $binary_remote_addr zone=connperip:1000m;
[...]

  limit_conn connperip 2000;
  limit_req zone=flood burst=1200 nodelay;
  limit_req zone=bot burst=1000 nodelay;

and followed by:

sv stop nginx
sv start nginx
under /var/www/discourse

we still get 429 (“too many requests”) despite these changes.

Is there any other setting we should change? The error seems to come from discourse itself and not NGINX. I got this error:

{"errors":["You’ve reached the maximum number of new topics. Please wait 15 hours before trying again."],"error_type":"rate_limit","extras":{"wait_seconds":54224}}

If I try to post messages with other users, then it seems to work fine.

I wonder where is the setting to remove this restriction of number of new topics for each user. I didn’t find it under Settings \ Users or Settings \ Posting.

actually I found what I was looking for under Settings \ Rate Limits

If you’re trying to import data from another forum, you’ll be much better off looking at the existing import scripts.