Discourse のグローバルレートリミット

こんにちは、

Discourse をバージョン 2.2.5 にアップグレードしました。
これは、1 日あたりのユーザー 1 人あたりの投稿数に関する制限についてです。

現在のデフォルト設定は以下の通りです:
DISCOURSE_MAX_REQS_PER_IP_PER_MINUTE:IP あたりの 1 分間のリクエスト数(デフォルトは 200)
DISCOURSE_MAX_REQS_PER_IP_PER_10_SECONDS:IP あたりの 10 秒間のリクエスト数(デフォルトは 50)

これを以下に増やしたいと考えています:
DISCOURSE_MAX_REQS_PER_IP_PER_MINUTE:1000
DISCOURSE_MAX_REQS_PER_IP_PER_10_SECONDS:500

Discourse サーバーやパフォーマンスに影響が出るでしょうか?
一部のユーザーから、送信できる投稿数に制限に達しているという苦情が出始めているためです。

よろしくお願いいたします。

I do not think this is the rate limit being discussed. Provide screenshots of the limiter being hit please or get more details.

It sounds like your users are running into first day user post count limits is my guess.

User gets error like:

01:09:42 {"errors":["You’ve performed this action too many times. Please wait 19 seconds before trying again."],"error_type":"rate_limit","extras":{"wait_seconds":19}}

That is indeed the Nginx per-IP rate limits, are you sure you are not behind a reverse proxy which is incorrectly sending all client IP addresses as the same IP address?

Is it always the same users? Are they trying to use the API?

If it’s not and they aren’t then check the profiles of some affected users, do their IPs look accurate? Are they all the same or similar? If so it’s either a misconfigured reverse proxy or something like Cloudflare being used with the orange cloud enabled without the template specified in the YML.

Yes they are using the same user, to generate a lot of posts per minute (via user API key).
But they now complain they are limited in terms of number of posts allowed for that user.

Do you think it could help if I increase:
DISCOURSE_MAX_REQS_PER_IP_PER_MINUTE : 1000
DISCOURSE_MAX_REQS_PER_IP_PER_10_SECONDS : 500

「いいね!」 1

私も同じ問題に直面しました。APIを使いたかったのですが、こんなエラーが出てしまいました


管理者に対して特定のAPIのレート制限を設定できるようにしたいと考えています。
グローバルなレート制限の修正方法がわかりません。
どこにあるか教えていただければ幸いです。
中国から来たため、英語が下手で申し訳ありません。

当社は、一律の API レート制限のみを設けており、ルートごとに制限をカスタマイズする機能は備えていません。

お探しの制限は、サイト設定にあります。

  • トピック作成のレート制限
  • 投稿作成のレート制限
  • 新規ユーザーによるトピック作成のレート制限
  • 新規ユーザーによる投稿作成のレート制限

これらを変更するには、https://discourse.example.com/admin/site_settings/category/rate_limits?filter=create にアクセスしてください。

「いいね!」 2