# User\_10\_secs\_limit

**URL:** https://meta.discourse.org/t/user-10-secs-limit/373500
**Category:** Development
**Created:** [July 9, 2025, 7:28am UTC](https://meta.discourse.org/t/user-10-secs-limit/373500 "2025-07-09T07:28:55Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![truman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/truman/32/491648_2.png) [@truman](https://meta.discourse.org/u/truman)
#### Post date: [July 9, 2025, 7:28am UTC](https://meta.discourse.org/t/user-10-secs-limit/373500/1 "2025-07-09T07:28:55Z")

</div>

```plaintext
Slow down, you're making too many requests.
Please retry again in 5 seconds.
Error code: user_10_secs_limit.

```

I created a theme that uses `await ajax(/t/${this.args.topic.id}.json);` . This gets rate-limited due to excessive requests. How can I avoid this? I noticed the restriction is flagged as a ​ **user-level limit** , not an IP-based limit.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 9, 2025, 2:11pm UTC](https://meta.discourse.org/t/user-10-secs-limit/373500/2 "2025-07-09T14:11:37Z")

</div>

Are you behind a load balancer like cloudflare so that Discourse doesn’t know the user’s actual IP address?

A quick grep and I don’t see `user_10_secs_limit` in the code except in a spec. I suspect it might be IP related in spite of the error you are seeing.

---

<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: [July 9, 2025, 3:00pm UTC](https://meta.discourse.org/t/user-10-secs-limit/373500/3 "2025-07-09T15:00:45Z")

</div>

[Here](https://github.com/discourse/discourse/blob/main/lib/middleware/request_tracker.rb#L492) - You can’t grep it 🙂

`error_code: "#{error_code_identifier}_10_secs_limit",`

Coming from [discourse/lib/request\_tracker/rate\_limiters/user.rb at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/main/lib/request_tracker/rate_limiters/user.rb)

@truman is your theme component doing this for many topics? What exactly are you trying to accomplish? You should either see if you can combine the calls, for instance by tagging the topics and then retrieving them by tag in a single call, and/or you should figure out a cache mechanism.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 9, 2025, 3:06pm UTC](https://meta.discourse.org/t/user-10-secs-limit/373500/4 "2025-07-09T15:06:47Z")

</div>

> [@RGJ](#):
>
> error\_code: “#{error\_code\_identifier}\_10\_secs\_limit”,

Aha! I figured I was overlooking something simple. . .

---

<div class="post-metadata">

### Author: ![truman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/truman/32/491648_2.png) [@truman](https://meta.discourse.org/u/truman)
#### Post date: [July 10, 2025, 2:50am UTC](https://meta.discourse.org/t/user-10-secs-limit/373500/5 "2025-07-10T02:50:57Z")

</div>

I want to fetch the reactions for each topic so that I can display them on the homepage. like:  
 ![image](https://global.discourse-cdn.com/meta/original/4X/9/3/4/9345ed5ba59b81b2f2fd7a1b53dc7f9de8688bf2.png)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 10, 2025, 5:13am UTC](https://meta.discourse.org/t/user-10-secs-limit/373500/6 "2025-07-10T05:13:37Z")

</div>

You need serialise this in a plugin to avoid all these queries so all the data you need is brought down in one go.

You should not have to fire off a query for every topic in your topic list. That’s never going to scale.

For an example of where this is done take a look at Topic List Previews.

> <https://github.com/merefield/discourse-topic-previews-sidecar/blob/master/lib/topic_previews/topic_list_item_serializer_extension.rb>

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 10, 2025, 1:27pm UTC](https://meta.discourse.org/t/user-10-secs-limit/373500/7 "2025-07-10T13:27:57Z")

</div>

Get the all-the-plugins repo and look for add\_to\_serializer

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [August 9, 2025, 1:28pm UTC](https://meta.discourse.org/t/user-10-secs-limit/373500/8 "2025-08-09T13:28:12Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
