How to extend the timeout for services if they fail to start or stop
Problem:
CodeTwo services cannot be started or stopped.
Solution:
In some environments, applications installed as Windows services may require more time to start or stop. Click on the links below to learn how to change the timeout for service applications in Windows.
A CodeTwo service is unable to start on its own and times out
To avoid the service startup problem (Fig. 1.), you can:
- delay the automatic start of the service that causes the problem;
- additionally, you can increase the timeout value for the service startup in the Windows registry.
Fig. 1. A CodeTwo service does not start and times out.
How to delay the automatic start of a service application
If a service's start is delayed, this service attempts to start only if critical system serviceshave already started. To configure your service this way, you need to:
- Run Windows Services manager (launch services.msc from the Start menu).
- Right-click on the service you would like to configure, and select Properties.
- On the General tab, change the Startup type to Automatic (Delayed Start), as shown in Fig. 2. for CodeTwo Exchange Sync.
Fig. 2. Selecting the startup type of a service.
How to increase the timeout value for the service startup
Additionally, you can change the timeout value for the service startup in the Windows registry:
- Launch Windows Registry Editor.
- Find the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
- Right-click this key and select New > DWORD (32-bit) Value.
- A new value namedNew Value #1 appears on the right.
- Change the name of this new value to ServicesPipeTimeout.
- Right-click the ServicesPipeTimeout value you created, and choose Modify. The Edit DWORD Value window opens.
- Change Base to Decimal.
In the Value data field, type
the value (in milliseconds) of time allowed for the service to start, and click OK.- Finally, restart the machine.
A CodeTwo service does not stop
If the problem happens for the first time and you are not able to close the service from within Windows Services manager (services.msc) or Task Manager, you can kill the service using the taskkill command. See this Knowledge Base article for details.
If the problem occurs frequently, follow the steps below to extend the service closing timeout:
- Launch Windows Registry Editor.
- Locate this registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
- Right-click this key and choose New > DWORD (32-bit) Value.
- A new value namedNew Value #1 appears in the right pane.
- Rename the new value to WaitToKillServiceTimeout.
- Right-click the value and select Modify. The Edit DWORD Value window pops up.
- Change Base to Decimal.
In the Value data field, type the value (in milliseconds) of time allowed for the service to stop, and confirm by clicking OK.
Info
By default, Windows waits 20000 ms, so you might need to set a higher value.
- Finally, restart your machine.
See also:
Related products: | CodeTwo Email Signatures for Email Clients, CodeTwo Exchange Folders, CodeTwo Exchange Rules 2007 3.x, 4.x, CodeTwo Exchange Rules 2010 1.x, 2.x, 3.x, CodeTwo Exchange Rules 2013 1.x, 2.x, CodeTwo Exchange Rules 2016 1.x, CodeTwo Exchange Rules 2019 1.x, CodeTwo Exchange Rules Pro 1.x, 2.x, CodeTwo Exchange Sync, CodeTwo Out of Office Manager, CodeTwo Public Folders 4.0, 4.5, 5.x |
Categories: | Troubleshooting |
Last modified: | January 31, 2019 |
Created: | March 7, 2012 |
ID: | 228 |