v2 API rate limits self-hosted installs by IP even with billing disabled

オープン 初心者向け
#8,452 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Rajkumar2002-Rk がすでに取り組んでいます。

2026年9月30日 から。

  • #8453 @Rajkumar2002-Rk による — オープン

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
75/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
活発
技術スタック
docker-compose, typescript
領域
backend

調査の方向性

セルフホスティングのドキュメントにある Environment Variables の「Limits」セクションを読み、V2_PREAUTH_IP_LIMIT が定義されている apps/sim/lib/api/server/routes/v2-json-route.ts と比較してください。Issue では、少なくとも IP ごとの固定リミットをドキュメント化することを提案しています。Self-hosted インストールにおける動作を説明するために「Limits」セクションを更新することが、明確な最初の成果です。環境変数または課金の動作に関するオプションの変更については未決定のままです。

索引モデルが issue の本文から書いたものです。

説明

The self-hosting docs (Environment Variables, "Limits") say installs with billing disabled "run without plan limits: no rate limits". The v2 API still enforces a fixed per-IP limit before auth: V2_PREAUTH_IP_LIMIT in apps/sim/lib/api/server/routes/v2-json-route.ts (600 burst, 300 per minute). It isn't affected by BILLING_ENABLED or the RATE_LIMIT_FREE_* variables, and there's no way to change it.

On a Docker Compose install, every request from the host arrives from the bridge gateway (172.19.0.1 here), so all local callers share one bucket. A batch job running sync executes with a log fetch after each one hit it and got 429 RATE_LIMITED. The server logs show storageKey: v2:preauth:ip:172.19.0.1.

Repro (billing off, no RATE_LIMIT_* set): send 800 quick requests to POST /api/v2/workflows/{id}/execute, even with an invalid API key. The first 600 return 401 and the rest return 429 with x-ratelimit-limit: 600.

At minimum it would help to mention this limit in the Limits section. It might also make sense to let self-hosters raise it with an env var, or to skip it when billing is disabled, but that's your call since it's there for abuse protection. Happy to send a docs PR.

主要言語
TypeScript
スター
29.8k
フォーク
3.9k
平均マージ
1時間 44分
マージ済み PR(30日)
841

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

simstudioai/sim のほかの issue

simstudioai/sim の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。