FYI: Stopping and re-starting AMS

FYI: Stopping and re-starting AMS

Postby wxPhil » Thu Dec 09, 2010 1:06 pm

Having ecxperienced a few problems similar to those in this thread, http://www.code-crafters.com/forum/viewtopic.php?f=6&t=2265 with AMS freezing/locking up every now and then, I wanted a way to automatically stop and then re-start the AMS service, as doing this manually seems to clear the issue.

The simplest way to do this is via a .bat file which can then be run as a scheduled task.

There seems no simple way of pausing execution of a .bat file, and in the end I settled on downloading the small sleep.exe from http://www.computerhope.com/dutil.htm
Whether this will work on Windows Server 2007 I don't know, but it does on 2003.

The name of the AMS service can be gotten from opening the Services management console within Windows, and examining the properties window of the AMS service. I don't know, but I guess it may differ from the below depending on what version of AMS you are running.

My .bat file ended up as follows - works a treat:

REM ---------
net stop CODE_CRAFTERS_AMS2_SERVICE

REM Pause a few seconds before restarting

REM this method not tested
REM PING 1.1.1.1 /N 5 /W 1000 > NUL

REM nor this either
REM TYPE NUL | CHOICE.COM /N /CY /TY,10 >NUL

REM this has! Put sleep.exe in same location and use
SLEEP 10

net start CODE_CRAFTERS_AMS2_SERVICE
REM ---------
wxPhil
 
Posts: 43
Joined: Fri Jan 04, 2008 11:58 pm

Re: FYI: Stopping and re-starting AMS

Postby cearnshaw » Tue Mar 22, 2011 8:24 pm

How often do you run your task Phil? I'm just wondering if this has taken care of the problem for you? Ours will go weeks without locking up, and then get into a cycle where it locks up several times a day, so I'm not sure if a once-daily restart would take care of the issue for me or not. I've found that rebooting the server seems to break the cycle, at least temporarily.

Cam
cearnshaw
 
Posts: 41
Joined: Tue Jun 17, 2008 9:19 pm


Return to General

Who is online

Users browsing this forum: No registered users and 9 guests

cron