Select to view content in your preferred language

Geo-processing getResultData() call has timing problems

634
3
06-08-2020 11:05 AM
PeterLen
Frequent Contributor

Hello,


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
3 Replies
tatham
by
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
Ranga_Tolapi
Frequent Contributor

Hi @PeterLen @tatham any updates on the root cause and fixes please.

0 Kudos
PeterLen
Frequent Contributor

No, I was never able to get an answer so I ended up writing a javascript function that essentially just looped and made another call to get the results until results were sent.  Not elegant, but that is what I had to do.

0 Kudos