You can delay the shutdown of the indexing server by using the StopProc.vbs script.
About This Task
When a server attempts to restart or shut down, there is a risk of the operating system shutting down even if processes on the server have not yet completed.
However, if the CVODS.exe process receives the restart/shutdown notification, it can bring down the index server gracefully if there is enough time between the restart/shutdown notification and the actual machine restart/shutdown. If the graceful shutdown of the index server takes more time than the operating system allows, the index server might go into an unusable state and thus require recovery.
To prevent the shutdown while the CVODS.exe process is still running, install the StopProc.vbs script as described below. Although this method delays the restart of the index server, in some scenarios the operating system may override the configuration and restart the index server even if the StopProc.vbs script is installed.
Note
When the index server attempts to restart or shut down, the existing CVD.exe process stops so that it does not accept any more requests. By setting up the StopProc.vbs script, if there are any CVODS.exe processes that are running during this period, the CVD process goes into the Stopping state and waits for the CVODS.exe process to gracefully end before shutting down the index server.
Procedures
To install the StopProc.vbs script:
-
In the Windows Run dialog box, type gpedit.msc, and then click OK.
-
From the Local Group Policy Editor, expand Local Computer Policy > Computer Configuration > Windows Settings > Scripts (Startup/Shutdown).
-
In the right pane, right-click Shutdown and then click Properties.
The Shutdown Properties dialog box is displayed, and the StopProc.vbs script can be viewed.
If StopProc.vbs script is not populated, in the Command Prompt, from the software_installation_directory/Base folder, run the following command:
AddScripttoShutdownGPO.exe -vm InstanceXXX -
Repeat step 3, above, to verify that the StopProc.vbs script is displayed in the Shutdown Properties.
-
On the Local Group Policy Editor, expand Local Computer Policy > Computer Configuration > Administrative Templates > System > Scripts.
-
Right-click the Maximum wait time for Group Policy script, and then click Edit.
-
In the Maximum wait time for Group Policy script Properties dialog box, select Enabled, and then in the Seconds box, enter 1800 (30 minutes).
By default, the time is set to 600 seconds (10 minutes).
This time interval prevents the shutdown while the CVODS.exe process is running.
To uninstall the StopProc.vbs script:
-
In the Command Prompt, from the software_installation_directory/Base folder, run the following command:
AddScripttoShutdownGPO.exe -vm InstanceXXX -uninstall -
After running the command, restart the computer.