SafeDisk AI

Docker /dev/shm No Space Left On Device

A container can fail with write /dev/shm/...: no space left on device while the host disk still has plenty of free space. Treat it as a shared-memory, session, or health-check loop incident before deleting app data or Docker volumes.

Free browser cleanup

Find the biggest storage culprit first.

Run the Chrome or Edge web scan, delete one approved low-risk item free, then use the $29 Deep Cleanup only if meaningful space remains.

Start free cleanup Send $29 payment link
First evidence

Separate host disk, container shared memory, and runaway sessions.

These checks are read-only. They show whether the failure is ordinary disk pressure, a tiny default 64 MB /dev/shm, or a request loop creating too many session artifacts.

container="YOUR_CONTAINER_NAME"

echo "== host and container filesystems =="
df -h /
docker exec "$container" sh -lc 'df -h / /tmp /dev/shm 2>/dev/null || true'
docker exec "$container" sh -lc 'df -i / /tmp /dev/shm 2>/dev/null || true'

echo "== largest /dev/shm entries =="
docker exec "$container" sh -lc 'find /dev/shm -maxdepth 2 -type f -printf "%s %p\n" 2>/dev/null | sort -nr | head -40'

echo "== recent shared-memory/session errors =="
docker logs --since=2h "$container" 2>&1 | grep -Ei "dev/shm|no space left|SIGBUS|session|health" | tail -80
Send $29 payment link

What Not To Delete First

Common Root Causes

  1. Docker's default container /dev/shm is too small for the workload.
  2. A reverse proxy or health check hits an authenticated route and creates session files repeatedly.
  3. Browser automation, databases, Python workers, or image tooling use shared memory for temporary state.
  4. Workers crash and restart while leaving stale shared-memory files behind.
  5. The app logs the symptom as HTTP 400 or worker SIGBUS, hiding the storage boundary.
Copy-ready issue reply

Use this when maintainers ask for useful logs.

This keeps the thread focused on evidence they can act on without exposing secrets or deleting data.

I would capture this as a /dev/shm pressure incident, not ordinary host disk-full yet.

Useful evidence:
- container `df -h /dev/shm /tmp /` and `df -i /dev/shm /tmp /`
- largest files under `/dev/shm`, grouped by prefix such as session IDs
- request logs around the growth window, especially health checks, redirects, and unauthenticated paths
- worker restart logs showing SIGBUS or "no space left on device"
- compose/run config showing `shm_size` or Docker's default 64 MB shared memory

Acceptance check for a fix:
- the health-check route no longer creates sessions
- `/dev/shm` usage stabilizes over the previous failure window
- stale session cleanup only runs after active writers are stopped or aged out
- alerting watches `/dev/shm` free bytes separately from host disk free bytes
Send $29 payment link

Still not sure what is safe?

Use the free browser cleanup for local Mac storage, or request the $29 Deep Cleanup when the evidence points to a Docker, session, or shared-memory cleanup boundary.

Start free cleanup Send $29 payment link
Deep Cleanup

Still full after the free cleanup?

Send your email once. We reply with the $29 payment link, one clarification, or a no-pay answer if the free cleanup is enough.

Start free cleanup first