During a burst of pushes to #148's branch (with large log directories), Gitea rose to 1.75 GiB (docker stats), running git format-patch, git diff --shortstat and git log --numstat -- the pull request's patch test and diff statistics, redone on every push. With the server at 3.8 GiB, swap filled.
Done when
[git] MAX_GIT_DIFF_FILES and MAX_GIT_DIFF_LINES (and MAX_GIT_DIFF_LINE_CHARACTERS) in app.ini, set so a large PR stops early
Practice: while a PR is open, commit locally and push once (one patch test, not several); the developer protocol (#135) says so
Verified: a push of a large log directory to an open PR, Gitea's peak under the limit
### Found (2026-11-08)
During a burst of pushes to #148's branch (with large log directories), Gitea rose to **1.75 GiB** (`docker stats`), running `git format-patch`, `git diff --shortstat` and `git log --numstat` -- the pull request's patch test and diff statistics, redone on every push. With the server at 3.8 GiB, swap filled.
### Done when
- [ ] `[git] MAX_GIT_DIFF_FILES` and `MAX_GIT_DIFF_LINES` (and `MAX_GIT_DIFF_LINE_CHARACTERS`) in `app.ini`, set so a large PR stops early
- [ ] Practice: while a PR is open, commit locally and push once (one patch test, not several); the developer protocol (#135) says so
- [ ] Verified: a push of a large log directory to an open PR, Gitea's peak under the limit
🤖 Filed with [Claude Code](https://claude.com/claude-code)
rajames
added this to the v4.0.0-alpha.4 milestone 2026-11-08 00:38:40 +00:00
A runaway diff now stops instead of eating the memory. Left: the practice (push once per open PR, written into #135) and the check against the next large push.
Done on the server (Captain Bob, 2026-11-08), in `app.ini`:
- `[git]` `MAX_GIT_DIFF_LINES = 300` (was 1000), `MAX_GIT_DIFF_FILES = 30` (was 100), `MAX_GIT_DIFF_LINE_CHARACTER_COUNT = 2000` (was 5000)
- `[git.timeout]` `DEFAULT = 300` (5 minutes per git operation), `GC = 60`
A runaway diff now stops instead of eating the memory. Left: the practice (push once per open PR, written into #135) and the check against the next large push.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found (2026-11-08)
During a burst of pushes to #148's branch (with large log directories), Gitea rose to 1.75 GiB (
docker stats), runninggit format-patch,git diff --shortstatandgit log --numstat-- the pull request's patch test and diff statistics, redone on every push. With the server at 3.8 GiB, swap filled.Done when
[git] MAX_GIT_DIFF_FILESandMAX_GIT_DIFF_LINES(andMAX_GIT_DIFF_LINE_CHARACTERS) inapp.ini, set so a large PR stops early🤖 Filed with Claude Code
Done on the server (Captain Bob, 2026-11-08), in
app.ini:[git]MAX_GIT_DIFF_LINES = 300(was 1000),MAX_GIT_DIFF_FILES = 30(was 100),MAX_GIT_DIFF_LINE_CHARACTER_COUNT = 2000(was 5000)[git.timeout]DEFAULT = 300(5 minutes per git operation),GC = 60A runaway diff now stops instead of eating the memory. Left: the practice (push once per open PR, written into #135) and the check against the next large push.