Where Is Automatic Restart Of My Phone?
One of our Windows Services crashes a few times a month. When that happens, a tech has to log into the server and start the service once more, which is a pain. Isn't in that location a way to restart the service automatically after information technology crashes? Please assistance.
— Kirkland
Hi Kirkland.
A Windows Service is Microsoft's technology of pick for mission-critical applications that must run 24/seven/365. Every bit such, it's incredibly frustrating when a service crashes and fails to evangelize on that primary task!
Not to worry though, nosotros've got your dorsum. Here are a couple of means to ensure that your Windows Service rebounds quickly afterward a crash (or other failure).
Solution #1: Configure Service Recovery (Basic)
Skillful news! Windows Services come with a congenital-in recovery mechanism.
If you open up your troublesome service in the Services application, you will notice the Recovery tab:
There, you lot tin can specify what happens the showtime, second and subsequent times that your service fails.
Windows tin perform one of the post-obit three actions in response to a failure:
-
Restart the service
-
Restart the calculator
-
Run a program
Or you tin can select "Take no action" to do null at all. That is the default for new services.
If you choose to run a program, y'all must specify the full path to the program to run, along with any parameters required.
For your situation, we recommend that you set all failure deportment to "Restart the Service":
Simple, right? Well, perchance not. While the actions are straightforward, exactly what defines a failure? Under what weather condition will Windows invoke the actions y'all take specified (i.eastward. to restart the service)?
Let's back up a bit and address that mystery.
Microsoft's definition of service failure
From the technical documentation, a service fails if it:
-
Terminates without reporting a status of SERVICE_STOPPED to the Service Control Manager, or
-
Exits with a non-zero exit code.
Note that (b) applies only if the Enable actions for stops with errors box on the Recovery tab is checked. Y'all should definitely enable that pick because doing so will allow Windows to catch a wider range of failures of your misbehaving service.
To sum up, hither is our final recommended recovery configuration:
Adjacent, allow'southward await at where Windows Service recovery does a great chore and where it'south not quite up to the chore.
What service interruptions are covered past the Recovery tab?
The recovery settings higher up will comprehend a wide array of interruptions of your service.
For example, Windows will restart your service if:
-
The service ends unexpectedly
-
The service'south process is terminated (e.g. someone kills it from Task Director)
-
The service exits with a not-zero error code
What service interruptions are Non covered past the Recovery tab?
Sadly, the post-obit disruptions are not handled by the basic recovery settings:
-
The service fails to start at boot
-
Someone accidentally stops the service from Services (or using the NET or SC commands)
-
The service stops unexpectedly merely exits with code 0 (due east.g. due to a issues in the software)
-
An internal component of the service crashes but the service shuts downwards unremarkably
-
The service has a memory leak and stops working later on information technology runs for a while
Other ways that Service Recovery falls short
Besides the above:
-
Service failures will be silent. That's because the recovery options do non include notification. As a result, you may non find out when your service fails to start.
-
There is no protection in "zombie" situations — where your service is running but isn't working as expected. Unfortunately, the recovery options are not sophisticated enough to look across the service'south status.
Solution #2: Deploy Service Protector (Advanced)
For comprehensive protection confronting a wide range of problems — including the ones listed above — you should use our Service Protector software.
Service Protector keeps any Windows Service running 24/seven/365. Whenever a service stops — no matter the reason — Service Protector will immediately restart it.
Here's a await at Service Protector babysitting the Windows print spooler service on our Server 2022 machine:
But Service Protector is much more than automatic restarts. Hither are some of its key features:
Stuck service detection
Service Protector will handle non-responsive services that become stuck in the "Stopping" or "Starting" states for also long.
CPU hog detection
You can tell Service Protector to restart your service if information technology "runs hot" for a long period.
Memory leak/hog detection
A Windows Service that constantly eats up RAM can pb to disaster. Service Protector will cease and recycle leaky services, to costless upward accumulated memory and restore normal operation.
Email alerts when things go wrong
To ensure that y'all are kept in the loop, Service Protector can send you an email whenever your service fails.
Extensibility
Extend Service Protector with your own, customized failure detection plugins. Use them to observe and restart "zombie" Windows Services.
Workflow
Need to perform some housekeeping tasks earlier your service starts? Service Protector can run a batch file (or program) before restarting your Windows Service.
Scheduled restarts
Sometimes software that has been running for too long doesn't work. Service Protector can restart your service (or reboot the PC) at specific times, to minimize the effects of memory leaks and continue your service "fresh".
Daily/Weekly reports
Service Protector will email you summaries of restarts, crashes, etc.
Error control
Service Protector will automatically dismiss those abrasive "I accept crashed!" bulletin boxes that tin halt the action.
Restores disabled services
If some clever person disables your service from the Services application, Service Protector will automatically re-enable it.
Try Service Protector for Gratis
Best of all, yous tin setup your service with Service Protector and see how it works completely free for 30 days. No need to make a purchase, register your email or provide a credit bill of fare. Just download and install.
Finally, while the Recovery tab is free, a perpetual license of Service Protector costs $69.99.
Still, if you are operating in a commercial surround where downtime is plush, nosotros recommend making that small-scale investment to bulletproof your servers.
All-time of luck with your service!
Y'all may also like...
Where Is Automatic Restart Of My Phone?,
Source: https://www.coretechnologies.com/blog/windows-services/auto-restart-service/
Posted by: brownbarromempose.blogspot.com

0 Response to "Where Is Automatic Restart Of My Phone?"
Post a Comment