Unreal "LogInit ... out of memory" during cook in CI
Unreal cooks and builds are memory-heavy. When the cook commandlet or the C++ compile spawns more work than the runner has RAM for, the process is OOM-killed or logs that it ran out of memory.
What this error means
The job dies during cook or compile with "Ran out of memory", a LogMemory/LogInit warning, or an OOM kill (exit 137), even though the same build runs on a larger machine.
LogInit: Warning: Ran out of memory allocating ... bytes
LogMemory: Platform Memory Stats ...
Killed
AutomationTool exiting with ExitCode=137Common causes
The runner has too little RAM
Cooking large content and compiling many translation units in parallel can exceed a small runner memory, triggering an OOM kill.
Too many parallel build actions
High UBT parallelism multiplies peak memory, so the build can run out of RAM even when total work fits on a bigger machine.
How to fix it
Use a larger runner
Move the cook/build to a runner with more memory so the peak fits.
jobs:
cook:
runs-on: ubuntu-latest-16coreCap build parallelism
Limit the number of parallel compile actions so peak memory stays under the runner limit.
./Engine/Build/BatchFiles/Linux/Build.sh MyGameEditor Linux Development \
-project="$PWD/MyGame.uproject" -MaxParallelActions=4How to prevent it
- Size runners to the cook/build memory footprint.
- Cap parallel actions to bound peak memory.
- Split very large content cooks where possible.