Issue
You have a Java application executing as a Windows service. After enabling the Java agent for this service, you are encountering service timeout warnings on starting the service.
Cause
The Java Agent is called before an application starts and has to take some pre-initialization steps. The amount of work completed and therefore time taken is dependent on whether Assess or Protect is enabled, with Assess requiring more work and therefore more time for the agent to complete its initialization.
See this article: Java Agent Effects on Startup Performance for more information.
Java applications installed on Windows as a service are constrained by the service timeout on Windows. The default service timeout (current as of Windows Server 2016) is 30s from when the service moves into a status of STARTING and then into RUNNING. Due to the extra time added by the Java Agent pre-initialization, there may be some scenarios where an error is reported as the service takes too long to start.
Resolution
The timeout in question can be changed by editing the Windows Registry manually as follows:
- Click Start, click Run, type regedit, and then click OK.
- Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
- 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.
- Right-click ServicesPipeTimeout, and then click Modify.
- Click Decimal, type 60000, and then click OK. This value represents the time in milliseconds before a service times out.
- Restart the computer
Alternatively, using a text editor, create a file with the extension .reg
containing the following:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control]
"ServicesPipeTimeout"=dword:0000ea60
Save the file and double click it. You will be presented with a warning asking whether to change the registry - select Yes
, then restart the computer to pick up the change.