Steve, keeping in mind that you might possibly be the only person on the
planet doing this exact function, I would say that you are correct in
that Witango will wait for the external action (.bat) to complete before
proceeding. You could very easily get around this by firing off a @URL
(waitforresults=false) when you want to restart the service. Your error
script would complete normally and your new URL would count to 10 and
then roll the service. This will only work if Witango is continuing to
process requests, which seems to be the case. An alternative method
might be to set a scheduled process to run do_something.bat each minute.
Then you could write do_something.bat to roll the service when you hit
your error, and then set do_something.bat back to an empty file using
the startupurl. Finally, it might simply be possible to change the order
of the events that you have now and send the user the nice error screen,
then fork your restart process.

I'll add one other thought, although I do not suggest using this method,
and I do not currently use this method. Back when I was having issues
with Tango2000, I installed my old Tango 3.5 service on the server and
wrote a watch/restart script in 3.5. Since the services were unique
separate services, I didn't have to worry about my restart script
failing, or other issues. Errors were generated normally and restarting,
if needed, was handled from the outside 3.5 application.

Robert

-----Original Message-----
From: Fogelson, Steve [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 09, 2004 4:35 PM
To: Witango User Group (E-mail)
Subject: Witango-Talk: Witango Restart strategy

I have modified Scott Cadillac's error reporting routine to check for
the
type of error being reported and depending on the error to restart the
Witango service. The error routine is a tml file that is specified in
witango.ini as the DEFAULTERRORFILE variable.

If the tml code determines that the service need to be restarted, it
creates
a tcf object and from the tcf executes an external action. The action
runs
restart.bat with the following code:

START "Restart Witango Service" /high
C:\InetPub\wwwroot\CatSite\start.bat
EXIT

start.bat has the following code:

C:\WINNT\System32\WAIT 10
NET STOP "Witango Server 5"
C:\WINNT\System32\WAIT 3
NET START "Witango Server 5"
EXIT

The first bat file is supposed to open an new cmd window and execute
start.bat. As soon as the second window is open, it closes the first. I
was
hoping that this approach would make Witango think that the external
action
is completed (even though start.bat is still executing), and end the
external action, so the error routine could complete. I am trying to
serve
some html from the error routine to the visitor that received the error,
that the site will be back up in a few seconds.

I figured that if start.bat waited for 10 seconds to stop the service,
that
the error routine would have time to complete and serve the html, but it
seems to be waiting for start.bat to finish. Then the thread that was
running the visitor's taf is closed and the visitor receives:
The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot
be
displayed.

I also tried serving the html from the tcf using a "push", but there
isn't a
push option available for the tcf.

Am I right? Is there any way to get around this?

Thanks

Steve Fogelson
Internet Commerce Solutions
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to