Potential for Data Loss: The steps detailed in the resolution of this article may result in a loss of critical data if not performed properly. Before beginning these steps, make sure all important data is backed up in the event of data loss. If you are unsure or unfamiliar with any complex steps detailed in this article, please contact Product Support for assistance.
- ES takes up to 30 minutes to perform a shutdown.
- Trace log contains multiple entries indicating
- "Subscription service forcefully shutting down; [sub-server name]"
- "Subscription service forcefully shut down; [sub-server name]"
- A secondary issue - When performing Windows Updates automatically, Windows attempts to shut down all running services within one minute which can end the Enterprise Server service prematurely
EcoStruxure Building Operation
- Building Operation Enterprise Server 3.1.x and below
- Large Multi-server installation
During a shutdown procedure of the Enterprise Server a call to every sub server is made to remove subscriptions. However, the thread pool that executes these commands may already be stopped and the server then waits the 15 seconds timeout period prior to moving to the next item. On a large 100+ multi-server installation, this 15 second delay can accumulate to a lengthy shutdown period.
The trace log will contain the messages shown in the issue and the 15-second delay between each server
Upgrading to 3.2.2 (and above) will rectify the timeout issue provided that the subscription thread pool has already stopped. These versions now ignore the 15-second timeout for each sub-server if the thread pool has already stopped.
It is possible to extend the Windows service shutdown time by adding or adjusting a registry entry called WaitToKillServiceTimeout
To change the timeout:
- Start the registry editor (“Regedit”)
- In the tree on the left, navigate to:
- In the right panel, find the WaitToKillServiceTimeout value. If you don’t see it, create it by:
- Selecting Control on the left
- Choosing Edit > New > String Value (not DWORD) from the menu
- Naming the new value WaitToKillServiceTimeout.
- Double-click the WaitToKillServiceTimeout entry to bring up the Edit String window.
- Enter a numeric value (e.g. 60000) in the Value data field in milliseconds and click OK to save your change.
- Reboot your computer. The new timeout setting will not take effect until Windows restarts.
Note that this modification will not make Windows wait indefinitely for your service to finish. If your service takes longer than the entered time (in this example 60 seconds), it will still be terminated. Be sure to choose a timeout value that is long enough to cover your scenario, but not too long to make shutdown time intolerable.