Long running gp task sort of fails

3331
7
10-25-2010 02:49 PM
KevinGooss
Occasional Contributor
I have a long running gp task that is a python script exposed by as a gp tool over the js api.
When i execute the task it returns a dojo.io.script error saying the Timeout exceeded. However a few seconds later it does return the correct result.
Something on the server I think is causing the timeout error message to be returned which is firing the errcallback on the method call, instead of waiting for the true result to fire my callback method.
I have tried to modify the timeout settings in IIS, web.config, and web.config in the rest services config. I also bumped the server object idle times, tried both pooled and non-pooled and synchronous/asynch on the server object.
If I could just ignore the err callback and get the method to fire when the result came back i would be set but if i comment out the err callback the true callback never gets hit.
Is there some magical one minute setting in IIS or ags?
Any suggestions?
0 Kudos
7 Replies
derekswingley1
Frequent Contributor
Not sure if this is applicable but have you looked at esri.config.defaults.io.timeout?
0 Kudos
KevinGooss
Occasional Contributor
That was precisely it. Thank you very much
0 Kudos
JeffMcCullough
New Contributor
Kevin,

I am now having the same exact problem, and I have tried all the solutions that you have tried.  Can you tell me how you used esri.config.defaults.io.timeout in your code?  Where did you place it?  If I could see a sample of the code with it, that would be great!

Thanks!

Jeff McCullough
0 Kudos
HemingZhu
Occasional Contributor III
Kevin,

I am now having the same exact problem, and I have tried all the solutions that you have tried.  Can you tell me how you used esri.config.defaults.io.timeout in your code?  Where did you place it?  If I could see a sample of the code with it, that would be great!

Thanks!

Jeff McCullough


If you set GP service Execution type as Asynchronous (on Parameters tab) and then its timeout property is controlled by The maximum time a client can use a service(on Pooling tab). you don't have to set esri.config.defaults.io.timeout. Just remember in API using GP.sumbitJob instead of GP.execute.
0 Kudos
JeffMcCullough
New Contributor
Thanks for the response.  I am running asynchronous and I am using SubmitJob and I am still getting time out errors.  When you say properly set, what do you mean?  It currently is 600 secs and when I run this gp on Arcgis server, it runs fine, and there are no issues.

Any other suggestions?

Thanks!
0 Kudos
nidhiarora
New Contributor
Hi ,

I am also using asynch GP tak and Submit job . In the GP service tab  in timeout session , i have set each parameter as 6000 sec . I have also set the value of esri.config.defaults.io.timeout=600;

but i still get the timeout exception.

Any ideas will be appreciated


regards,
Nidhi
0 Kudos
DallasShearer
Occasional Contributor
looks to me that the setting for esri.config.defaults.io.timeout
is defined in milliseconds so setting it to esri.config.defaults.io.timeout = 600
is a .6 second timeout
I set mine to esri.config.defaults.io.timeout = 300000
to give me a 5 min timeout.
0 Kudos