[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 197
  • Last Modified:

Service not responsive but mmc says its running

I work in a casino and our back end system has a service that is prone to memory leaks.  So at random times this service will stop responding, but still reports as running in MMC.  I was wondering if there was a script or something of the like that would check the service and restart it if its not responding.  All I know how to do is check the state of the service.  Which doesn't yield the results that I need.  Any help would be greatly appreciated.
0
Infamous_Q
Asked:
Infamous_Q
  • 2
  • 2
1 Solution
 
Brad GrouxCommented:
The easiest way would be to create a scheduled task utilizing a batch file.

Bat file example:
net stop <service name>
net start <service name>

Open in new window

NOTE: If the service has a space in the name, you must put it in "quotes."
0
 
Infamous_QAuthor Commented:
I have a task that does this daily. the issue is that the service run the player loyalty systems.  Its the type of system that I can't have go down.  The start and stop process takes too long during our heavy usage times to have it restart during those periods.
0
 
Brad GrouxCommented:
There really isn't a way to know if a service is "hung," so even with utilities like Service Hawk you are limited to a scheduled restart.

You may be able to try the Restart-Service PowerShell Cmdlet, it may cycle the service faster than a net stop/start.

Outside of that, you can throw more hardware at the program to compensate for the memory leak - but obviously the best scenario would be to optimize the app to alleviate the memory leak.
0
 
cococanCommented:
How often does it stop responding?  I would go to the vendor and ask to fix it immediately.  Sometimes it works.  If it hangs once a day or less, scheduled stop and restart at the best time for your business looks to me the only solution  unless you can run the service at another server while the problematic one is going down -- again, there may be conflicts on the network or front end side of the operations.  Such an important task and such low quality system!  I would bug the vendor, that is for sure.
0
 
Infamous_QAuthor Commented:
the power-shell cmdlet seems to work quite a bit faster and doesn't cause an interruption.  thank for the help.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now