sccache "Timed out waiting for server" / cannot connect in CI
The sccache client launched or looked for the server and it did not respond within the timeout. Either the server is slow to initialize its backend or it crashed on startup and left no listener.
What this error means
Builds fail with "sccache: error: Timed out waiting for server startup" or "error: couldn't connect to server", often intermittently under load.
sccache: error: Timed out waiting for server startup.
Maybe the remote storage is unreachable?Common causes
The backend is slow or unreachable at startup
The server blocks while probing remote storage; a slow S3/GCS/Redis endpoint pushes startup past the client timeout.
The server crashed and left no listener
A failed backend init kills the server, so the client keeps trying to connect until it times out.
How to fix it
Start the server first and raise the timeout
- Start sccache before the build so initialization is not on the critical path.
- Raise SCCACHE_STARTUP_TIMEOUT if the backend is legitimately slow.
- Check the error log if the server exited instead of started.
export SCCACHE_STARTUP_TIMEOUT=30
sccache --start-server
sccache --show-statsVerify backend reachability
Confirm the storage endpoint and creds work; an unreachable backend is the most common cause of a startup timeout.
export SCCACHE_LOG=debug
sccache --start-server 2>&1 | tail -n 20How to prevent it
- Start the sccache server before the build, not lazily on first compile.
- Raise SCCACHE_STARTUP_TIMEOUT for slow remote backends.
- Monitor backend reachability so timeouts are caught early.