memory (Physical Memory Limit)
This is the maximum total RAM that the container can use.
- Configuration: Set in
config.tomlviamemory = "4g". - If not set: Docker containers have no memory limit by default. If your build job consumes all 16 GB of the host’s RAM, the host itself may crash.
- Your case: The previous error
Job failed: exit code 1, accompanied byKilledin the logs, strongly suggests hitting a physical memory bottleneck—either the host ran out of memory or a memory limit was previously configured.
shm_size (Shared Memory Size)
This is a special in-memory filesystem. Although it resides in RAM, its size is restricted separately.
- Configuration: Set in
config.tomlviashm_size(value in bytes). - Why is the default 64 MB insufficient?
- Browser testing: If you run Puppeteer, Playwright, or Selenium (launching headless Chrome) in CI, Chrome heavily relies on
/dev/shmfor page rendering. 64 MB fills up instantly, causing browser crashes (errors typically showPage crashed, not OOM). - High-concurrency builds: Some build tools (e.g., highly concurrent webpack/vite bundling) may leverage shared memory to accelerate inter-process data transfer.
- Browser testing: If you run Puppeteer, Playwright, or Selenium (launching headless Chrome) in CI, Chrome heavily relies on
- Recommendation: For modern frontend projects, allocate at least 1 GB (
1073741824) or 2 GB.