j127 reports that opening many Discourse tabs can trigger rate limiting without clear explanation, causing confusion. They suggest the UI should detect rate-limiting errors and advise users to close tabs. awesomerobot clarifies that idle tabs are rarely the issue; rather, rapidly opening many tabs (e.g., from notifications) exceeds the request rate limit, which is correct behavior. However, j127 argues that background tabs can still cause persistent rate limiting due to a specific bug: when a tab receives a 429 error, message-bus.js retries every 15 seconds instead of the normal 60 seconds for hidden tabs. With many tabs, this increases the request rate enough to keep the user blocked indefinitely because the limiter counts rejected requests and never expires. j127 proposes a fix: hidden tabs should wait max(Retry-After, backgroundCallbackInterval) when rate-limited.
Other users share experiences. vibenow mentioned being rate-limited across different sites, which Moin found surprising since limits are usually per-site. kmm1 (writing in Chinese) described hitting limits when bulk-opening tabs. Moin suggested using the “next topic” theme component to avoid opening new tabs, but kmm1 preferred the tab approach for faster browsing without wait times. merefield corrected a misconception, noting the component doesn’t require full page reloads, though it may need updates.
Bas suggested the issue is often caused by inefficient plugins making excessive requests during initial page load, rather than polling. kmm1 agreed after testing, noting that opening 15 tabs caused no issues, implying a previous plugin might have been the culprit. pfaffman noted the rate-limit message text has been static for years but can be customized.
I’m not sure if there’s an easy way to fix this, but I just did it to myself.
If a user opens too many tabs of a Discourse site, they will get rate limited without an explanation.
It took me a few minutes to figure out, and after I figured it out, I checked the logs and can see that there’s a user in Europe who is getting rate limited from the same problem at the moment, probably not knowing why.
Would it be possible to make the UI check for a rate limiting message? And then if that tab is getting rate limited, it could show a message saying, “Please close some of your forum tabs because that’s why you’re getting rate limited.” Otherwise, there’s no indication about why the site doesn’t work.
Another idea is to add a line to the message something like this:
Slow down, you're making too many requests.
Please retry again in 5 seconds.
Error code: user_10_secs_limit.
If you have the forum open in many browser tabs open at once, close the tabs and the site will work again.
Edit: another idea is that if the frontend gets a rate-limiting message, that tab could print a message to the screen that it’s inactive, and then stop pinging the backend with that tab.
I didn’t check, but I think that message has been that way for a decade. It’s always made sense to me that opening a bunch of tabs would be making a bunch of requests. I guess just HAVING a bunch open could also have the same effect and that could be confusing.
You can customize the text if you want to change it on your forum.
How many tabs are we talking about here? usually idle tabs aren’t really doing a whole lot… the bigger issue tends to be the rate of which the tabs are opened.
The most common scenario in my experience is someone has 20 notifications and rapidly opens each one in a new tab. Towards the end of all those opens you’re likely to hit Slow down, you're making too many requests which is the correct error… you did too much too quickly. Usually by the time you reach one of those tabs you can refresh the page and be fine.
I see it regularly when I open tabs in the background too quickly, but it took me 15 minutes to figure out why I was getting rate limited after opening a huge number of them slowly and forgetting about them for a while.
I asked Claude to look at it and it said:
…normally a hidden tab polls once a minute, so 80 tabs is well under the limits. Once something bunches the polls together and one gets a 429, each tab retries every 15 seconds, four times faster than normal. 80 tabs retrying every 15 seconds is about 53 requests per 10 seconds, over the limit of 50. Discourse also counts the rejected requests, so the count never drops. Above about 75 tabs it keeps itself going until tabs are closed.
As soon as I rebooted the server, every browser tab apparently reconnected at the same time.
Claude said that
Hidden tabs poll 4 times faster after a 429, which can lock a user out of the site.
After a poll gets a 429, message-bus.js waits max(Retry-After, 15 s) before polling again, even in a hidden tab (the rateLimited branch of the complete handler). A hidden tab normally polls every backgroundCallbackInterval, which is 60 s in Discourse, so a 429 makes background tabs poll four times as often as when things are fine. With many tabs open, those retries alone keep the user over Discourse’s per-user limit (max_reqs_per_ip_per_minute, 200 by default): four polls a minute per tab passes 200 at about 50 tabs. The limiter is created with aggressive: true, so rejected requests count too and the block never expires. Every page load gets “Slow down, you’re making too many requests” until the user closes tabs. Changing network doesn’t help, because the limit is per user.
The cross-tab brake (hiddenTabShouldWait, a 1.5 s spacing through localStorage) also didn’t space hidden tabs out.
Suggested fix: when rate limited, wait max(Retry-After, normal interval for this tab), where the normal interval is callbackInterval when long polling and backgroundCallbackInterval otherwise. Add random jitter so tabs rejected together don’t retry together, and ideally back off on repeated 429s. Visible tabs are unchanged, since their interval is shorter than any Retry-After.
I don’t know how prevalent the problem is, but it might be worth looking at.
Sorry I posted that reply before I saw your message. I had the composer window filling the page and was going back and forth between Claude for a while.
I wasn’t doing anything with my forum when it happened. The tabs were sitting in another browser window in the background, but something must have triggered a burst, and then once they got rate limited, that triggered more connections. Then when I rebooted, they probably all connected at the same time.
I’m not sure exactly what happened. Claude’s description above probably explains it better.
Thanks for the suggestion, but it seems this requires waiting for the page to load every time a topic is switched.
I prefer right-clicking in the list view to open all links at once. This way, after browsing the previous topic, I can simply switch tabs without having to watch the loading page or wait for it to load.
This[1] is how I use Discourse (and other websites) too.
Usually it doesn’t give issues, but I sometimes hit the limit. That sometimes happens when new plugins are installed that do more requests on page-load.
I don’t think the polling after the initial load is the main issue here, it’s the many requests done on initial load.
If you experience this a lot, it could be worth it to check if you’re running any (inefficient) custom plugins?