Repository navigation
hotfix(poller): cap wiki ingestion subrequest fan-out (#130, patch) - #131
Merged
liplus-lin-lay merged 1 commit intoApr 26, 2026
Conversation
W4 (#128 / PR #129) deploy 後、Cloudflare Worker logs に "Too many subrequests by single Worker invocation" が大量発生。 1 cron invocation で 5 repos × N pages × 10 extension probe を 直列実行して per-invocation 1000 subrequest 上限を突破した。 修正: - WIKI_EXTENSIONS を主流 2 種 (md / markdown) に縮小。 mediawiki / org / rst / pod / textile / asciidoc / creole は per-page probe ごとに 1 subrequest を消費するので、bulk import worst case を予測可能にするため一旦削減。cached extension が ある page は影響なし (1 fetch で済む既存ロジック維持)。 follow-up: 上記 8 種を per-repo opt-in flag 経由で再導入候補。 - MAX_WIKI_PAGES_PROBED_PER_REPO_PER_RUN = 20 を新設。 pollWiki 内で per-repo の probe 数を硬く capping。bulk import を 複数 cron run に自然分散させ、1 invocation の subrequest 総量を ~110 ((20 pages × 1-2 probes + wikiExists + listPages) × 5 repos) に抑える。Cloudflare Workers Paid (1000/invocation) で安全マージン。 挙動上の変更: - 大規模 wiki (100+ pages) の初回 import は複数 cron run に分散 (20 pages/run × 4 runs/hour = 80 pages/hour/repo) - mediawiki / org / rst 等の wiki page は本 hotfix では index されない (該当する wiki がプロジェクト内に現状存在しないため実害ゼロ) Closes #130
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
github-rag-mcp | 7a48f79 | Apr 26 2026, 12:59 AM |
liplus-lin-lay
commented
Apr 26, 2026
liplus-lin-lay
left a comment
Member
Author
There was a problem hiding this comment.
AI 自己レビュー (auto, patch hotfix)
仕様適合
- #130 の修正方針 2 件すべて反映 (WIKI_EXTENSIONS 縮小 + MAX_WIKI_PAGES_PROBED_PER_REPO_PER_RUN 新設)
- 既存 schema 不変、cached extension 経路維持
- 観測した production 障害 (Too many subrequests) の根本対処
subrequest 見積もり
- listWikiPages: 1/repo
- wikiExists: 1/repo
- 新規 page probe: 最大 2 fetch × 20 pages = 40/repo (worst case)
- cached page fetch: 1/page (今回 cap 内 20 pages = 20/repo)
- 合計 worst: ~62/repo × 5 repos = ~310 subrequests/invocation。Paid 1000 limit に対して 30% 程度の余裕
挙動変更の trade-off 申告
- mediawiki / org / rst / pod / textile / asciidoc / creole 形式の wiki page は本 hotfix で未 index。プロジェクト内 wiki は md / markdown のみで実害ゼロを確認。follow-up で per-repo opt-in flag 検討
- 大規模 wiki の初回 import が複数 cron run に分散。20 pages/run × 4 runs/hour = 80 pages/hour/repo、許容範囲
残リスク
- 50 (Free plan) per-invocation limit のアカウントだとまだ足りない可能性。github-rag-mcp 運用は Paid 前提なので問題なしと判断
- subrequest 見積もりは静的試算。本番で実測値がどう出るかは deploy 後の log で確認すべき
判定
auto patch hotfix self-review 承認、gh pr merge --squash で進める。本番 deploy 後の次 :45 cron で改善確認。
liplus-lin-lay
deleted the
130-hotfix-wiki-ingestion-exhausts-worker-subrequest-budget-on-initial-bulk-poll
branch
April 26, 2026 01:01
This was referenced Apr 26, 2026
Merged
This was referenced May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
W4 (#128 / PR #129) deploy 後、Cloudflare Worker logs に `Too many subrequests by single Worker invocation` が多発。`pollWiki` が 1 cron invocation で 5 repos × N pages × 10 extension probe を直列実行して 1000-subrequest/invocation 上限を突破していた。
観測した literal
```
wikiExists probe failed for Liplus-Project/dipper_ai: Too many subrequests by single Worker invocation
fetchWikiContent probe md/markdown/mediawiki/org/rst/rest/textile/pod/asciidoc/creole failed
for Liplus-Project/github-rag-mcp/installation.ja: Too many subrequests
```
修正
総 subrequest 見積もり: 5 repos × (20 pages × 1-2 probes + 2 overhead) ≈ 110/invocation。Cloudflare Paid (1000) で安全マージン。
挙動の変更
バージョン
patch (v0.8.5)。hotfix、production 障害解消が目的。
テスト
関連