gitoria
All repositories: gitoria
4.9 KB
# G25c: what makes live gitoria memory grow (#25) — result: none found locallyBranch g25c-hunt (g25c was taken by an older branch), worktree ../gitoria-G25c, no code change, no commit needed. Day52 bin, copy of backup gitoria.worldapi.org-20261108-1448 (scratch /media/STORAGE/claude-scratch/gitoria/g25c, port 8734, stopped).## Request mix (access log 13:50-18:20 UTC, 6274 lines; mem window 13:53-17:13 UTC)GET only (1 POST). Status: 200 5341, 429 685 (nginx rate limit, 680 on /commit/<sha>), 304 210, 204 18 (/__hl/up), 302 12, 404 3, 400 3 (API /api/tickets, Gitoria agent), 201 1, 499 1. No 5xx, no 500/fault at all.Classes: /commit/<sha>/<file> 3816 (61 %, ~850/h, 3108 distinct, GPTBot 1929 lines + Chrome 153 scraping, repos routger/gitoria/ident), /theme/shell/* 790, static .hl components/lib ~1300, /login.js 210 (304), /commit/<sha> 42, /branch/main 35, /code/* ~40, /__hl/* ~60, API 8. No ssh/git smart-HTTP, no websocket/SSE. Per hour 14h: 2378, 15h: 1396, 16h: 1580, 17h: 327. Only commit-file views are frequent enough (~850/h) to explain 24 MB/h: that would need ~28 kB/request.## Replay (Python client, one connection per request, warm-up 200-500 then n requests; VmRSS of the app process; noise ±10-30 MB from GC)| class | n | B/req ||---|---|---|| commit file (real shas/paths, 3108) | 1500 | -1062 || commit root | 1000 | -34951 (noise) || static .hl/js/css (8 files, incl. 404s) | 1000 / 4000 | +16687 / -7244 || /__hl/up | 1000 | +336 || / , /code, /branch/main | 1000 each | -14963, -5546, +750 || 404 path, 404 unknown commit, unknown slug | 1000 each | +999, -3416, +8 || API unauth /api/tickets (404 here) | 1000 / 4000 | +28815 / +156 || /api/repos | 1000 | -2245 || HEAD commit file | 1000 | -6193 || client drops after headers | 1000 | -1192 || /commit/../../etc/passwd | 1000 | +9093 |Single positives (static, api-unauth, pwned-path) vanished or went negative in larger runs: GC jitter, not per-request growth. Local RSS stayed 127-200 MB throughout.## VerdictNo request class grows locally; no path returned 500 (live log has none either). The live +24 MB/h is not caused by any anonymous read class. Not covered: signed-in pages, SSH/push, the tickets-sync/watch background work (GITORIA_WATCH=0 here), session sweeps, real 429/Cloudflare behaviour, runs over hours. Live RSS also drops (14:13 212 MB after 230 MB), so part is plain heap slack.## Next stepLong local soak (1-2 h) with GITORIA_WATCH=1 and the tickets snapshot, with signed-in session and push/ssh, sampling VmRSS every 10 min; or an hl:heap snapshot on live at 180 vs 320 MB. Repro: tools/replay.py in the scratch dir (class name, warm, n).## StoppedApp server pid read from rpid (child of hybriel) on 8734 killed; nothing of mine listens.## Soak (2026-11-09, 90 min, day52, port 8736, stopped)Setup: fresh copy of the 14:48 backup, GITORIA_WATCH=1 (live compose has 0), events sender timer on (as live), tickets URL rewritten in repos.mpack to a local stub on 8737 (GET `[]`, POST 201; the stub was hit 10 times), signed-in session of the creator, test repo `soaktest` created through gitoriaCreate, HTTPS clone/push with a token (17 pushes, 44 clones, 0 failures; sshd not run). Load: 2104 anonymous requests drawn at random from the real log mix (5569 usable lines) at 0.39/s (the live rate), plus a signed-in page every 20 s (269), a makeToken now and then. Driver: tests/g25c-soak.py (copy). hl:heap worked through a temporary /__heap route in project.hl (not committed).RSS every 5 min (kB): 188k at start (compile), then 58, 149, 71, 144, 67, 43, 53, 61, 156, 63, 142, 68, 76, 39, 176, 180, 111, 48 (final). Pure sawtooth 40-180 MB with no upward trend over 90 min; RSS does not track the GC heap here.hl:heap start → end: GC heap 35.5 MB → 41.6 MB (+6.0 MB, +35.5k objects); 'plugin/runtime' root flat (31.10 MB both); 'globals' 4.26 → 5.23 MB; 'statics' 0.14 → 5.21 MB (+32.8k objects, almost all 'Hybrid named'); Function 626 → 991 and Environment 208 → 573 (+365 each). The static growth fits the bounded LRU caches filling (lib/markdown.hl mdCache: 32 entries / 4M chars; lib/homepage.hl hpCache: 64 / 8M chars), so it should level off at about 10 MB; 90 min did not show whether it does. The +365 Function/Environment pairs are unexplained (about 4 per minute; one per session event or timer tick?) and tiny (~85 kB).Verdict: no growth of ~24 MB/h reproduced with anonymous, signed-in, push and fetch traffic; the only measurable growth is ~6 MB of heap in 90 min, mostly statics (caches). Not covered: ssh, real ident login, real tickets responses (stub returns `[]`, so the tickets sync and mention comments are barely exercised), hours-long runs, GITORIA_WATCH=0.Next: (1) 6-8 h soak with the 5-min heap snapshot to see whether statics level off at ~10 MB; (2) find what creates 365 Function/Environment objects (compare a run with only anonymous traffic to one with only signed-in/emit traffic); (3) if live RSS still climbs, take hl:heap on live at 180 and 320 MB (the live heap type table would show whether it is heap or allocator slack).
Branches
Latest commits
- fe209ffeMerge branch 'w56-owner-members' into mainGitoria
- fa0754c8|||PR repository owner transfer and members API (#55)mre
- 8862e537Merge branch 'w55-rename-org' into mainGitoria
- 014d2b7fOne immutable readers snapshot per move for the left-organization event (#53)mre
- 1859d506Decide who hears a repo left its organization by its readers before the move (#53)mre
- 499f25f2Review fixes for the Settings organization move (#53)mre
- ed3b922b|||PR move a repository into an organization in Settings (#53)mre
- 74ec2af8Merge branch 'w54-repo-rename-pr' into mainGitoria
- 9f7ce8d8Preserve rename compatibility and live page titlesmre
- c3d95b6e|||PR separate names and addresses, rename repositories in Settings (#53)mre
- ce08920dMerge branch 'w52c-header-phone' into mainGitoria
- 0bab9e46|||PR header: ident status wraps on phones instead of clippingmre
- e7af3eceMerge branch 'w52b-approval-followup' into mainGitoria
- c01e66c6|||PR approvals follow-up: live Merge after status writes, helpers (#52)mre
- 841da497Merge branch 'w53-pulls-speed-pr' into mainGitoria
- 80307ae2|||PR pulls page cache: live PR numbers, complete scans onlymre
- 69141f65|||PR pulls page: cache the git part per repo by branch tipsmre
- 155861f6Merge branch 'w52-person-approval' into mainGitoria
- b5435de8|||PR person approvals: second Kunibert round (#52)mre
- 3a8b2fb8|||PR person approvals: Kunibert review fixes (#52)mre