CI "gzip: stdout: No space left on device" - Disk Full While Compressing
gzip could not write its compressed output because the destination disk is full. The write target - often an artifact tarball or a piped file - ran out of space mid-stream, so gzip aborted.
What this error means
A compression step fails with gzip: stdout: No space left on device, frequently while producing a .tar.gz artifact or log bundle. The output file is left truncated. df -h confirms the target filesystem is at 100%.
tar -czf artifact.tar.gz ./build
gzip: stdout: No space left on device
tar: artifact.tar.gz: Cannot write: Broken pipeCommon causes
The compressed output has nowhere to land
Even though compression shrinks data, the output still needs disk. If the source already nearly fills the volume, writing the archive alongside it exhausts the remaining space.
The disk was already near full from caches/artifacts
Prior build output, caches, and artifacts left little headroom, so the compression write is what crosses the line.
How to fix it
Check and reclaim disk
Confirm the full filesystem, then free space.
df -h
du -sh ./* 2>/dev/null | sort -rh | head
docker system prune -af --volumesWrite the archive to a roomier volume
- Direct the output to a path on a larger disk (e.g. the runner temp/scratch volume).
- Compress in chunks or exclude large unneeded paths so the output is smaller.
- Delete the source tree after archiving if both share a near-full disk.
How to prevent it
- Write artifacts to a volume sized for source plus compressed output.
- Trim what you archive so outputs stay small.
- Watch disk usage before artifact/compression steps on reused runners.