Geo-processing getResultData() call has timing problems

06-08-2020 11:05 AM
Occasional Contributor


I have a geo-processing tool that I call from my client's Esri Javascript API where I call the submitJob to start it.  When I get the call back that the job process has completed (my callback function), I then get the jobid and call the getResultData() function in order to get the geo-processing tool's response to the request. This has worked as expected for a long time.  We recently have had to migrate to new Windows servers (Windows Server 2008 to Windows Server 2016) and as part of that have migrated from ArcServer 10.2 to ArcServer 10.6.  When I added our existing web client in our new enivronment, however, I found some troubling results.  Now when the callback function is called to indicate that the process has completed, I get the infamous "cannot complete operation" when making the getResultData() call.  I am finding that there is some timing issue.  When I make the getResultData() call, ArcServer apparently does not know how or where to find the results based on the jobid.  If I wait a few seconds then I can get the results.  In other words, the Esri Javascript API said it completed the geo-processing call and gave me a jobid to query ArcServer to get the results, but ArcServer was not yet ready to handle that query properly..... unless I waited a few seconds.  Currently, that waiting is roughly 5 seconds (after the completion notification) in order to ensure that I can get the results.  

Does anyone have any clue as to what may be happening?

Thanks - Peter

0 Kudos
1 Reply
New Contributor

Hi Peter

We seem to have recently started having very similar issues, however neither Windows or ArcServer have been updated recently.

Did you find out anymore about the apparent need to wait for a few seconds in order to get a successful response?

0 Kudos