0 0 Share PDF

Windows Server node fails to restart containers

Article ID: KB000632


Windows Server node fail to restart containers with errors such as this:

Error response from daemon: hcsshim::ActivateLayer failed in Win32: The process cannot access the file because it is being used by another process. (0x20)

Root Cause

The default shutdown timeout (10 seconds) for Docker daemon is too short, and resources cannot be unmounted in time.


Delay the restart time using "shutdown-timeout": 30 in $Env:ProgramData/daemon.json, which allow extra time for graceful shutdown:

{ "debug": false, "shutdown-timeout": 30 }

What's Next

Configuration of Docker Daemon on Windows Server is explained extensively in this MSDN article: