39

I have migrated software to a very slow sever. Some software services refuses to startup because of system timeout. How do I increase timeout from default 30 sec.(?) to several minutes?

Thank you in advance!

user149691
  • 531
  • 1
  • 4
  • 6

3 Answers3

78

You can modify the timeout value in the registry.


1. Click Start, click Run, type regedit, and then click OK.
2. Locate and then click the following registry subkey:
 - HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
3. In the right pane, locate the ServicesPipeTimeout entry.

**Note**: If the ServicesPipeTimeout entry does not exist, you must create it. To do this, follow these steps:

 - On the Edit menu, point to New, and then click DWORD Value.
 - Type ServicesPipeTimeout, and then press ENTER. 
4. Right-click ServicesPipeTimeout, and then click Modify.
5. Click Decimal, type 60000, and then click OK.
 - This value represents the time in milliseconds before a service times out.
6. Restart the computer.

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
  • 1
    user149591 please mark this as the answer. – Nick DeMayo Feb 11 '15 at 18:17
  • @NickDeMayo Seeing as how he hasn't been back since August 19th, that seems unlikely to happen. – HopelessN00b Feb 11 '15 at 18:44
  • @HopelessN00b Can't mods mark stuff as answered on behalf of the users? :) – MichelZ Feb 13 '15 at 12:52
  • 1
    For more discussion on how to control this timeout in other situations (Windows restart, etc) see this SO answer: https://stackoverflow.com/a/29928342/434413 – Chris Kline Jul 20 '17 at 13:02
  • Does anybody know the maximum value for this registry entry? I've just tried putting 10 minutes (on Windows 10) and I have the impression my service already stops at 5 minutes. – Dominique May 09 '18 at 07:17
  • 1
    @Dominique 2 to the 32nd power, minus 1. Not that a value that high will do you any good. That’s just how long Windows will wait... if a process is taking that long to start, it sounds to me like it’s having trouble starting, and it might not be the Windows service timeout that’s causing your pain. – HopelessN00b May 14 '18 at 11:27
  • I'm finding this works for `net stop` just fine as my batch files wait very long for big services to stop (MySQL8) but `net start` still times out and fails in my batch files soon after attempting to start. Are there separate values for start/stop timeout? – ScottN Nov 11 '22 at 15:37
7

Here is a quick one-liner, which can be executed from an elevated PowerShell prompt, that sets the pending service timeout to 3 minutes:

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control" -Name ServicesPipeTimeout -Value 180000 -Type DWord

lauxjpn
  • 231
  • 3
  • 8
1

Please find a visualized answer by appuals.com

enter image description here

  • 2
    Hi, and welcome! Thanks for your answer, but please follow the [guidelines](https://serverfault.com/help/how-to-answer). So: please answer with text and not just a picture (so it's easier to find and read), and add context to the link. – curropar Jun 24 '20 at 11:02