This repository was archived by the owner on Feb 21, 2026. It is now read-only.
Commit dd5aa53
fix: resolve container OOM hangs from tsgo and --memory flag
Two issues caused containers to hang indefinitely:
1. Apple Container's `--memory` flag treats bare numbers as bytes, not
megabytes. `--memory 1024` = 1024 bytes, causing the VM to never boot.
Fix: use proper suffix (`--memory 4G`).
Ref: apple/container#1202
Ref: apple/container#1208
2. tsgo (TypeScript native compiler) has no default memory ceiling — Go
doesn't auto-detect container memory limits, so tsgo allocates unbounded
memory until the VM hangs under memory pressure.
Fix: set GOMEMLIMIT=3GiB in entrypoint.
Ref: microsoft/typescript-go#2125
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 2e8cc65 commit dd5aa53
2 files changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
| 234 | + | |
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| |||
0 commit comments