Windows service timeout with the Java Agent enabled

  • Updated


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.


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.


The timeout in question can be changed by editing the Windows Registry manually as follows:

  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:
    1. On the Edit menu, point to New, and then click DWORD Value.
    2. 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

Alternatively, using a text editor, create a file with the extension .reg containing the following:

Windows Registry Editor Version 5.00


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.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request