sillsdev / sillsdev/languageforge-lexbox
SendNewProject_Big flakes: hgweb is OOMKilled at 400Mi on the 180 MB push
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 9
- Forks
- 8
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 49
Description
Testing.SyncReverseProxy.SendReceiveServiceTests.SendNewProject_Big fails intermittently in the GHA integration tests because the hgweb container is OOMKilled while unbundling the push. The test is not at fault — it sits right at the memory ceiling by design — but it fails on unrelated PRs and gets re-rolled, so it costs review time.
Evidence
Two runs about 50 minutes apart, on unrelated branches, with an identical signature:
| Run | Branch | unbundle body |
|---|---|---|
| 31696184703 | chore/document-dotnet8-chorusmerge-pin |
189,695,076 bytes → 502 |
| 31700197936 | pt/missing-lex-code (#2547) |
189,695,051 bytes → 502 |
Chain, from each run's dotnet-k8s-logs artifact:
logs-ingress.txt— nginx buffers the request body to a temp file, thenPOST /send-new-project-<id>-dev-flex?cmd=unbundlereturns502after ~1.1 s.logs-lexbox.txt— the API proxies tohg:8088and getsSystem.Net.Http.HttpIOException: The response ended prematurely. (ResponseEnded), followed by a run ofHttpRequestException: Connection refused (hg:8088). Collateral:Job DataUpdate.UpdateProjectMetadataJob threw a JobExecutionException: Connection refused (hg:8088).describe-hg.txt— thehgwebcontainer'sLast StateisTerminated / Reason: OOMKilled / Exit Code: 137, finishing at the same second as the 502.Restart Count: 1; the pod comes back and the rest of the suite passes.- Test-side: Chorus reports
abort: HTTP Error 502: Bad Gateway, and the assertion fails withDid not expect srOutput "Sync failure: ... Failed to send to LexBox".
Cause
hgweb is capped at 400Mi:
The test pushes 180 MB across 10 commits:
The existing comment in SendNewProject — "must be in separate commits otherwise hg runs out of memory" — is the same tuning acknowledgement from the client side. A 400Mi ceiling for a 180 MB unbundle leaves no headroom, so whether it OOMs depends on runner memory pressure at that moment. Note ENABLE_DEMAND_IMPORT: false in the same deployment, which raises Mercurial's baseline footprint; that is longstanding config, not a recent change.
Options
- Raise the
hgwebmemory limit in the base deployment (or just in the test overlay) enough to clear a 180 MB unbundle. Most faithful to what the test is meant to cover, but it also reflects a real production limit worth thinking about — a 180 MB user push would hit the same wall. - Shrink the test payload, which weakens what the test proves.
- Split the push into more commits, which only moves the ceiling.
The first seems right, but the number should come from someone who knows what production actually needs to survive.
Also seen
The same suite failed elsewhere on unrelated branches the same day, so SendNewProject_Big may not be the only instability: UnauthorizedUserCloneHgWeb (31695546591), InitFwDataProject_PopulatesTheEmptyRepoWithTheRequestedWritingSystems (31680119938), and whole-block ApiTests failures (31673009635, 31667434391). Those were not investigated here and may well have separate causes.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with deployment/base/hg-deployment.yaml around lines 86-90 and backend/Testing/SyncReverseProxy/SendReceiveServiceTests.cs around lines 145-148. Review the linked GHA logs and the existing SendNewProject comment to confirm the memory failure and determine an appropriate limit or test overlay. Done means the 180 MB SendNewProject_Big push no longer OOMKills hgweb or produces a 502 in repeated integration runs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, github-actions, kubernetes
- Domain
- ci-cd, infrastructure, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100