Have a problem with a synchronous gp service where it fails occasionally, not every time. In the script I have several calls to MakeFeatureLayer followed by a SelectLayerByLocation and it runs fine with just those but when I add in code for MakeTableView followed by a SelectLayerByAttribute it doesn't run consistently like it should. It fails half the time with "Error Executing Task".
I'm running it as synchronous because I have a bunch of returned results. When its asynchronous it seems to messy to get any more than 1 result because you have to call GetResultData for each result parameter.
Not sure where to find the error messages for synchronous tasks because there doesnt seem to be a job folder created that would have a "messages.xml" file. As previously noted, I only get "Error Executing Task" and no other messaging back from the task.
I have a feeling it has something to do with the SetParameterAsText function in the script and that maybe the results im setting for the TableView piece dont necessarily match the script's parameter type set for the script (i've tried TableView and Feature Layer types and both produce the same inconsistent results.
Any help is appreciated