# 이 작업을 너무 많이 수행했습니다 오류

**URL:** https://meta.discourse.org/t/you-have-performed-this-action-too-many-times-error/159909
**Category:** Development
**Tags:** rest-api
**Created:** [8월 5, 2020, 12:17오후 UTC](https://meta.discourse.org/t/you-have-performed-this-action-too-many-times-error/159909 "2020-08-05T12:17:21Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![KranthiKiranGude](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kranthikirangude/32/135387_2.png) [@KranthiKiranGude](https://meta.discourse.org/u/KranthiKiranGude)
#### Post date: [8월 5, 2020, 12:17오후 UTC](https://meta.discourse.org/t/you-have-performed-this-action-too-many-times-error/159909/1 "2020-08-05T12:17:21Z")

</div>

아래 오류가 꽤 자주 발생합니다.

`{"errors":["You’ve performed this action too many times. Please wait a few seconds before trying again."],"error_type":"rate_limit","extras":{"wait_seconds":0}}`

이 오류를 없애는 방법을 알려주세요. 조언을 부탁드립니다.

---

<div class="post-metadata">

### Author: ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)
#### Post date: [8월 5, 2020, 12:52오후 UTC](https://meta.discourse.org/t/you-have-performed-this-action-too-many-times-error/159909/2 "2020-08-05T12:52:06Z")

</div>

설정 \> Rate Limit 항목을 확인해 보세요. 원하는 대로 값을 변경할 수 있습니다.

---

<div class="post-metadata">

### Author: ![KranthiKiranGude](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kranthikirangude/32/135387_2.png) [@KranthiKiranGude](https://meta.discourse.org/u/KranthiKiranGude)
#### Post date: [8월 5, 2020, 1:39오후 UTC](https://meta.discourse.org/t/you-have-performed-this-action-too-many-times-error/159909/4 "2020-08-05T13:39:06Z")

</div>

@IAmGav 님, 안녕하세요.

아래 설정들을 적용해 보았습니다.

1. rate limit create topic = 0 (주제를 생성한 후, 사용자가 다른 주제를 생성하려면 (n)초를 기다려야 합니다.)
2. rate limit create post = 0 (게시물을 작성한 후, 사용자가 다른 게시물을 작성하려면 (n)초를 기다려야 합니다.)
3. rate limit new user create topic = 0 (주제를 생성한 후, 신규 사용자는 다른 주제를 생성하려면 (n)초를 기다려야 합니다.)
4. rate limit new user create post = 0 (게시물을 작성한 후, 신규 사용자는 다른 게시물을 작성하려면 (n)초를 기다려야 합니다.)

하지만 여전히 오류가 지속되고 있습니다. 확인해야 할 다른 제한 사항이 있을까요?

---

<div class="post-metadata">

### Author: ![KranthiKiranGude](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kranthikirangude/32/135387_2.png) [@KranthiKiranGude](https://meta.discourse.org/u/KranthiKiranGude)
#### Post date: [8월 11, 2020, 5:07오전 UTC](https://meta.discourse.org/t/you-have-performed-this-action-too-many-times-error/159909/6 "2020-08-11T05:07:08Z")

</div>

다음 링크에 언급된 모든 설정을 비활성화했습니다:

> [@Available settings for global rate limits and throttling](https://meta.discourse.org/t/global-rate-limits-and-throttling-in-discourse/78612):
>
> Discourse ships with 3 different global rate limits that can be configured by site admins. Global per-ip rate limits These limits apply to every unique IP address that hits the Discourse application. (files that are served directly from the filesystem or the CDN are excluded) By default this rate limit is enabled, you may disable it or set it to a reporting mode. DISCOURSE\_MAX\_REQS\_PER\_IP\_MODE : default block, this rate limit applies out of the box. (other options are warn, warn+block, and n…

하지만 여전히 “You Have Performed this Action Too Many Times” 오류가 발생합니다.  
추가로 해야 할 것이 있나요?

---

<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: [8월 11, 2020, 7:53오전 UTC](https://meta.discourse.org/t/you-have-performed-this-action-too-many-times-error/159909/7 "2020-08-11T07:53:13Z")

</div>

그럼 정확히 어떤 작업을 하면 이 오류가 발생하나요?

---

<div class="post-metadata">

### Author: ![KranthiKiranGude](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kranthikirangude/32/135387_2.png) [@KranthiKiranGude](https://meta.discourse.org/u/KranthiKiranGude)
#### Post date: [8월 11, 2020, 8:52오전 UTC](https://meta.discourse.org/t/you-have-performed-this-action-too-many-times-error/159909/8 "2020-08-11T08:52:52Z")

</div>

API를 사용하여 주제를 생성하려고 하고 있습니다. API를 통해 약 100개의 주제를 생성하려고 할 때 이 오류가 발생하고 있습니다.  
또한 API를 통해 내 주제에 태그를 업데이트하려고 하고 있습니다. 내 포럼에는 태그가 없는 주제가 수백 개 있습니다. 그래서 API를 통해 해당 주제들의 태그를 업데이트하고 있습니다.

---

<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: [8월 11, 2020, 9:25오전 UTC](https://meta.discourse.org/t/you-have-performed-this-action-too-many-times-error/159909/9 "2020-08-11T09:25:27Z")

</div>

그렇다면 다음 값들은 어떻게 되나요?

`DISCOURSE_MAX_USER_API_REQS_PER_MINUTE`  
`DISCOURSE_MAX_USER_API_REQS_PER_DAY`  
`DISCOURSE_MAX_ADMIN_API_REQS_PER_KEY_PER_MINUTE`

그리고 이 숫자 이하로 유지하고 있다는 것을 _확신_하나요?

---

<div class="post-metadata">

### Author: ![Misha](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/misha/32/387440_2.png) [@Misha](https://meta.discourse.org/u/Misha)
#### Post date: [5월 21, 2024, 10:55오전 UTC](https://meta.discourse.org/t/you-have-performed-this-action-too-many-times-error/159909/10 "2024-05-21T10:55:28Z")

</div>

안녕하세요 👋  
저도 같은 문제를 겪고 있지만, 읽기(read) 작업에서 발생하고 있습니다.

Discourse와 연동 작업을 진행 중이며, API를 사용하여 많은 수의 게시글을 읽고 있습니다. 쓰기(write) 작업은 전혀 수행하지 않으며 읽기 작업만 합니다. 최신 게시글을 가져오기 위해 다음과 같은 절차를 따르고 있습니다:

1. `/latest.json` 엔드포인트를 사용하여 최신 주제(topics)를 가져옵니다.
2. 게시글 스트림을 가져오고 페이지네이션을 수행할 수 있도록 `/t/:id`를 통해 모든 주제를 순차적으로 가져옵니다.
3. 해당 주제에 게시글이 20개 이상인 경우, "stream"에서它们的 ID를 가져와 크기가 20인 청크로 순차적으로 가져옵니다.

또한 모든 요청을 큐에 넣어 10초당 약 25개 이상의 요청을 보내지 않도록 하고 있지만, 여전히 주제 또는 게시글 읽기 요청에서 “You Have Performed this Action Too Many Times Error” 오류를 자주 확인합니다. Discourse 설정으로 이동해 보았지만, 여기서는 읽기 작업에 대한 한도를 찾을 수 없습니다. "Create topics"와 같은 쓰기 작업에 대한 한도만 확인할 수 있습니다.

이 문제를 해결할 수 있는 방법이 있을까요? 조언을 주시면 감사하겠습니다. 오래된 주제를 다시 꺼내어 죄송합니다.

---

<div class="post-metadata">

### Author: ![Misha](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/misha/32/387440_2.png) [@Misha](https://meta.discourse.org/u/Misha)
#### Post date: [5월 21, 2024, 11:29오전 UTC](https://meta.discourse.org/t/you-have-performed-this-action-too-many-times-error/159909/11 "2024-05-21T11:29:57Z")

</div>

max\_admin\_api\_reqs\_per\_minute 한도에 도달한 것 같습니다. 이 값을 커스터마이즈할 수 있나요? 설정 \> Rate limits에서 해당 항목을 찾을 수 없네요.

수정: 실제로 두 가지 한도가 동시에 적용되는 것 같습니다. `admin_api_key_rate_limit`과 `ip_10_secs_limit`입니다.

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [5월 21, 2024, 2:39오후 UTC](https://meta.discourse.org/t/you-have-performed-this-action-too-many-times-error/159909/12 "2024-05-21T14:39:00Z")

</div>

`?print=true`를 추가하면 읽기 시 API 호출 횟수를 줄이는 데 도움이 될지 궁금합니다.

> [@API를 사용하여 특정 주제의 모든 게시글 가져오기](https://meta.discourse.org/t/fetch-all-posts-from-a-topic-using-the-api/260886?u=blake):
>
> notebook_with_decorative_cover 이는 Discourse API를 사용하여 특정 주제(Topic)의 모든 게시글(Post)을 가져오는 방법을 설명하는 안내서입니다. Discourse API의 많은 라우트에서 반환되는 결과는 페이지네이션(페이지 나누기) 처리됩니다. 예를 들어, [“단일 주제 가져오기”](https://docs.discourse.org/#tag/Topics/operation/getTopic) API 엔드포인트(예: https://examplesite/t/{id}.json)는 주제가 20개 이상의 게시글을 포함하더라도 기본적으로 20개의 게시글만 반환합니다. 이러한 동작으로 인해, .../t/{id}.json 엔드포인트를 사용하여 주제의 모든 게시글을 가져오는 두 가지 방법이 있습니다. 쿼리 파라미터 추가 주제의 모든 게시글을 가져오는 가장 쉬운 방법은 요청하는 URL에 print=true 쿼리 파라미터를 추가하는 것입니다. 예: https://examplesite/t/{id}.json?print=true print=true 쿼리 파라미터…

이렇게 하면 단일 API 호출로 1,000개의 게시글을 가져올 수 있습니다.

---

<div class="post-metadata">

### Author: ![Misha](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/misha/32/387440_2.png) [@Misha](https://meta.discourse.org/u/Misha)
#### Post date: [5월 21, 2024, 3:45오후 UTC](https://meta.discourse.org/t/you-have-performed-this-action-too-many-times-error/159909/13 "2024-05-21T15:45:10Z")

</div>

어떤 이유에서인지 `?print`에는 더 엄격한 속도 제한이 적용된다고 생각했었습니다.

 ![image](https://global.discourse-cdn.com/meta/original/4X/4/2/b/42bbc8e3705c2e6fb3ad93c91c80f2291ec61ab9.png)

하지만 `?print=true` 사용 때문이 아니라 다른 원인인 것 같습니다. 꼭 시도해 보겠습니다.

제 이해로는 이 방법은 포스트가 20개 이상인 주제에만 도움이 될 것 같습니다. 대부분의 주제는 포스트 수가 20개 미만일 테니, 실제 병목 현상은 주제에 대한 요청이 너무 많기 때문일 것입니다.

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [5월 21, 2024, 4:32오후 UTC](https://meta.discourse.org/t/you-have-performed-this-action-too-many-times-error/159909/14 "2024-05-21T16:32:59Z")

</div>

> [@Misha](#):
>
> 하지만 `?print=true` 사용 문제가 아니라 다른 무언가에 관한 것 같습니다.

네, 그것은 사용자를 제한하기 위한 것입니다. 관리자 API 키를 보유하고 있다면 그 설정은 귀하에게 영향을 미치지 않습니다.

> [@Misha](#):
>
> 즉, 실제 병목 현상은 토픽에 대한 요청이 너무 많다는 것입니다.

아 네, 그럴 가능성이 높겠습니다.

429 오류를 확인하고 거기서 지정된 양만큼 속도를 늦추는 것 외에도 몇 가지 옵션이 있습니다.

저는 데이터 탐색기 플러그인을 사용하여 원하는 모든 토픽을 가져오기 위한 쿼리를 작성하는 것으로 시작하겠습니다. 최대 1,000개의 결과를 반환할 것이라고 생각합니다. 그런 다음 API를 호출하여 쿼리를 실행하고 응답을 가져올 수 있습니다.

사용 사례에 따라 웹훅(webhooks)도 도움이 될 수 있습니다. 각 새로운 토픽과 게시물에 대해 웹훅을 설정하고 최신 콘텐츠에 대한 모든 이벤트를 수신 대기할 수 있습니다.

아직도 API 속도 제한을 높여야 한다고 판단되면, 그것은 우리가 할 수 있는 일입니다. 그러나 공유형 프로/비즈니스 호스팅이 아닌 엔터프라이즈 플랜의 사이트에만 적용됩니다.

---

<div class="post-metadata">

### Author: ![Misha](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/misha/32/387440_2.png) [@Misha](https://meta.discourse.org/u/Misha)
#### Post date: [5월 21, 2024, 5:01오후 UTC](https://meta.discourse.org/t/you-have-performed-this-action-too-many-times-error/159909/15 "2024-05-21T17:01:26Z")

</div>

데이터 탐색기 플러그인을 사용하는 문제점은, 우리가 디스코urs 통합의 유일한 사용자가 아니라는 것입니다. 저희([fibery.io](http://fibery.io))는 고객이 자신의 Discourse 인스턴스를 통합할 수 있도록 하여 데이터를 저희 도구로 원활하게 동기화할 수 있게 합니다.

웹훅은 좋은 추가 기능이지만, 첫 번째 동기화(가장 무거운 작업으로, 예: 지난 달의 주제와 게시글)에는 도움이 되지 않습니다. 그 이후에는 새 데이터에 대해 예약된 동기화를 수행하며, 이는 문제가 되지 않습니다.

429 상태 코드를 확인하고 재시도하는 방식은 잘 작동하지만, 때로는 느릴 수 있습니다.

확인해 주셔서 감사합니다. 🙇‍♂️
