Chromium-based browsers use /dev/shm for shared memory. In CI that mount is often small (64MB in containers), so a heavy test run fills it and the browser crashes.
What this error means
Browser tests fail with tab crashes, Target closed, or No space left on device referencing /dev/shm. Reducing parallelism or enlarging shm makes it pass with no test change.
shell
[ERROR] Failed to write to /dev/shm: No space left on device
Page crashed! ProtocolError: Target.activateTarget: Target closed.
Common causes
The shared-memory mount is too small
Containers default /dev/shm to 64MB. Chromium can exceed that quickly with multiple tabs or large pages, exhausting the mount.
Too many parallel browser instances
Each headless browser consumes shm; running many in parallel multiplies the pressure on a small mount.
How to fix it
Enlarge /dev/shm or bypass it
Give the container more shared memory, or tell Chromium not to use it.
docker
# docker: enlarge shm
docker run --shm-size=2g my-tests
# or launch flag
chrome --disable-dev-shm-usage --no-sandbox
Lower browser parallelism
Reduce the number of concurrent browser workers.
Close pages/contexts promptly between tests.
Run browser-heavy suites on a runner with more RAM.
How to prevent it
Set --shm-size for browser containers in CI.
Use --disable-dev-shm-usage for headless Chromium.
Cap browser worker concurrency to the runner size.
Frequently asked questions
What causes "/dev/shm full (browsers)"?
Containers default /dev/shm to 64MB. Chromium can exceed that quickly with multiple tabs or large pages, exhausting the mount.
How do I fix /dev/shm full (browsers)?
Give the container more shared memory, or tell Chromium not to use it.
Can Latchkey fix this automatically?
Yes. Latchkey runs your GitHub Actions on managed runners that detect this failure, apply the fix, and retry the job automatically - self-healing is on by default.