Change Windows Service Shutdown Timeout in Registry
During a Windows shutdown or restart, the operating system gives
running services a specific amount of time to close cleanly before
forcefully terminating them. This article explains the exact Windows
Registry setting responsible for controlling this timeout duration,
known as WaitToKillServiceTimeout, and provides
straightforward instructions on how to locate and modify its value to
resolve slow shutdown issues.
The Registry Value: WaitToKillServiceTimeout
The default timeout period for terminating unresponsive services
during a Windows shutdown is controlled by the
WaitToKillServiceTimeout string value.
- Registry Path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control - Value Name:
WaitToKillServiceTimeout - Data Type:
REG_SZ(String Value) - Default Value:
5000(in Windows 10 and Windows 11, representing 5,000 milliseconds or 5 seconds)
In older Windows versions (such as Windows 7), this value was set by
default to 12000 (12 seconds) or 20000 (20
seconds).
How to Modify WaitToKillServiceTimeout
To change how long Windows waits before killing unresponsive background services, follow these steps:
Press Win + R to open the Run dialog box.
Type
regeditand press Enter to launch the Registry Editor.In the address bar at the top, paste the following path and press Enter:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ControlIn the right-hand pane, locate and double-click the
WaitToKillServiceTimeoutentry.In the Value data field, enter your desired timeout in milliseconds (for example,
2000for 2 seconds, or5000for 5 seconds).Click OK to save the changes.
Restart your computer for the new configuration to take effect.
Considerations When Adjusting the Timeout
- Setting the value too low: If you set the timeout too low (e.g., below 2000 ms), critical services may not have enough time to flush data to the disk or finalize background tasks, potentially leading to corrupted files or lost application state.
- Setting the value too high: If a background service hangs completely, Windows will wait for the full duration specified in this key before proceeding with the shutdown, noticeably delaying your PC’s power-down time.