context deadline exceeded
DockerWARNINGNotableRuntimeMEDIUM confidence

API call to Docker daemon timed out

What this means

This is a generic timeout error from the Docker client, indicating that it sent a request to the Docker daemon but did not receive a response within a specific time frame. It often points to the daemon being overloaded, stuck, or unresponsive.

Why it happens
  1. 1The Docker daemon is busy with a long-running operation, such as building a very large image or committing a large container.
  2. 2The Docker daemon has hung or crashed and needs to be restarted.
  3. 3A storage driver issue is causing I/O operations to take an extremely long time.
  4. 4A network issue between the client and a remote Docker daemon (if DOCKER_HOST is set).
How to reproduce

Attempting to run 'docker ps' while the Docker daemon is stuck trying to remove a container with a faulty storage driver.

trigger — this will error
trigger — this will error
# The daemon is non-responsive due to an internal issue
docker ps

expected output

Error response from daemon: client version ... is too new. Maximum supported API version is ....
OR
Error response from daemon: context deadline exceeded

Fix 1

Restart the Docker Daemon

WHEN Multiple simple commands like 'docker ps' and 'docker info' are failing with timeouts.

Restart the Docker Daemon
# On Linux with systemd
sudo systemctl restart docker

# On Windows/macOS
# Quit and restart the Docker Desktop application.

Why this works

This is the most common solution. It terminates the stuck daemon process and starts a fresh one, clearing the unresponsive state.

Fix 2

Check for Long-Running Operations

WHEN The daemon is slow but not completely frozen.

Check for Long-Running Operations
# Check system logs for daemon activity
journalctl -u docker.service -f

Why this works

The daemon logs might reveal an ongoing task (like a build or pull) that is consuming all its resources, indicating you may just need to wait for it to finish.

What not to do

✕ Reboot the entire host machine immediately.

While it will likely fix the issue, it's a heavy-handed approach. Restarting only the daemon is much faster and less disruptive to other services running on the machine.

Sources
Official documentation ↗

Docker daemon reference

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All Docker errors