Disable Cache Service Auto Restart
At times, you may need to disable the automatic cache service restart. This is particularly crucial when applying Windows patches, which may trigger multiple server reboots. If left unchecked, these frequent restarts can result in unnecessary resource consumption and potentially disrupt the smooth functioning of your application environment.
The challenge intensifies when dealing with servers that are part of a cluster and the caches within the server have auto-start enabled. Whenever a server goes through a reboot, it can lead to complex scenarios, such as servers leaving or joining the cluster, ultimately leading to a state known as "Split Brain."
Note
By default, the Startup type is set to Automatic.
By setting the Startup type to Manual or Disabled in the cache service properties from the task manager, you can ensure that the Service remains inactive until explicitly started. This allows you to control when NCache should be running and avoiding any undesired impacts on your system during patching or maintenance tasks.
Setting the Startup Type to Manual
When you set the NCache Service's "Startup type" to Manual, the service will not start automatically when your system boots up. Instead, it will remain inactive until explicitly started by you. To do so:
Go to Start menu on the Taskbar and select Services.
Go to Open Services and then select NCache Service.
- Right-click on NCache Service and select Properties.
- In the General tab, locate the Startup type dropdown menu.
Change the Startup type to Manual.
Click Apply to save changes.
You can start the cache service manually through the task manager or Windows Powershell.
Note
The main reason for starting the NCache Service manually is that some of the patches complete their operations after the system startup. It is a good practice to start NCache Service manually once all the patches are fully applied and maintenance work has been completed on your server.
Setting the Startup Type to Disabled
Setting the NCache Service's Startup type to Disabled ensures that the service won't start automatically during system boot-up or be manually started until reverting the Startup type to Manual or Automatic.
To do so, just change the Startup type to Disabled in the dropdown menu.
Note
Changing the Startup type should be handled carefully, as it can lead to cache unavailability if not appropriately managed. Make sure to revert the NCache Service Startup type to Automatic once all the steps have been completed.