You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Bug report: worktree PR-status polling can hammer (and OOM) a self-hosted forge #8807
Orca resolves each worktree's branch to its PR by paginating GET /repos/{repo}/pulls?state=all&sort=recentupdate&page=N&limit=50 (up to MAX_PULL_REQUEST_PAGES = 5) and filtering client-side, with a 5 second request timeout.
On my self-hosted Forgejo repo with ~240 PRs this is rough:
Any worktree branch with no PR scans all 5 pages (250 PRs) before giving up, on every card refresh, per worktree.
Forgejo's PR-list endpoint is slow (~5s per page of 50, it loads reviewer data per PR), so Orca's 5s timeout cancels right as the server finishes and the work gets thrown away and retried.
Steady state was about 1 request/min; a push event refreshed all my worktree cards at once and the burst OOM-killed my Forgejo pod (512Mi limit) into a crash loop. I've bumped the limit, but Orca was the trigger.
Suggested fixes: query state=open instead of state=all (lazy fallback for merged detection), share one scan per repo across worktrees instead of per-card, cache negative results, and/or raise the timeout above 5s so completed responses aren't discarded. Root annoyance: the Gitea/Forgejo API has no head branch filter like GitHub's, so some scan is unavoidable, but it can be much cheaper.
Activity
fix(gitea): share and cache the /pulls scan so card refreshes can't h…
fix(gitea): share and cache the /pulls scan so card refreshes can't h…