I have an Application Web Server running hosting a Web Service. For an unknown reason the Application Web Server crashes and returns a 503 http error code. On the computer I can get everything back by republishing the web service or restarting the Application Web Server, actions that currently take a user to perform at the terminal. I would like to programatically do one of these to get the Application Web Server up and running agian when it goes down.
Just to note this is the APPLICATION web server to host web service VIs, not the Web Server to host HTML and other stuff.
The ideal way would to fix the Application Web Server from crashing but I need a short term solution while we figure that out.
I believe this could work for you. Section 12.
"In addition to the Build and Deploy menus on the project tree, you can also build and deploy a Web service programmatically using a VI.
LabVIEW provides G APIs to open a project and access all members defined within the project. Using the invoke node, you can programmatically open a project. You can also access the targets defined in the project using a property node."
In Windows you could configure in Services to restart the service on failure. Is this running on a PC or on a CompactRIO or PXI RT system?
The previous method is good however how programmatically defining whether the service is down could be tricky, depending on the hardware you are running on this could differ in method too.