AnsweredAssumed Answered

Can a Python script be triggered to run based on a ArcGIS Server Log message?

Question asked by decaturilgis on Jun 6, 2016
Latest reply on Jun 6, 2016 by JQuinn-esristaff


I'm using ArcGIS Server 10.2. I am getting a reoccurring message in my server logs related to one specific service. When this message occurs, the service stops working until I stop and restart the service. Then it works again for a few hours, before the whole process repeats itself.

 

Here is the message:

Level: SEVERE

Message: "A database error occurred"

Source: TSI_MH_Edit.MapServer

Code: 17000

 

I cannot fix the root cause of this problem (I am working under time constraints--eventually I will fix it), so I'm wondering if, in the meantime, a script could be triggered to run which would stop and start the service in question when this error occurs. So, when the message above appears in the Server Logs, it would trigger a script to stop and restart the service.

 

Has anyone ever done anything like this?

Outcomes