如何增加Windows服务启动超时


33

我已将软件迁移到非常慢的服务器。某些软件服务由于系统超时而拒绝启动。如何将超时从默认的30秒(?)增加到几分钟?

先感谢您!

Answers:


69

您可以在注册表中修改超时值


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.


1
请将此标记为答案。
尼克·德梅奥

@NickDeMayo看来自8月19日以来他再也没有回来,这似乎不太可能发生。
HopelessN00b

@ HopelessN00b mods是否可以代表用户将内容标记为已回答?:)
MichelZ

1
有关在其他情况下(Windows重新启动等)如何控制此超时的更多讨论,请参见以下SO答案:stackoverflow.com/a/29928342/434413
Chris Kline

1
@Dominique 2到32的幂,减1。并不是说那么高的值对您有好处。这就是Windows等待的时间...如果某个进程花了这么长时间才能启动,在我看来,启动似乎很麻烦,并且可能不是Windows服务超时引起您的痛苦。
HopelessN00b
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.