GlideAjax Timeout from UI Page

nichoffman
Kilo Expert

Hello,

We created a dedicated UI Page to launch a server side script while providing it with parameters.

To do so, we call a client callable Script Include using GlideAjax.

On client side, we basically wait for the server to answer to provide the user with a status on the page.

Depending on the parameters, the process could take from 30 seconds up to several minutes.

This how we noticed a timeout period of 300 seconds. I haven't found anything about increasing this periode whether it's as an Ajax parameter or function or at system property level.

Does anyone know hw I could extend this timeout?

Regards,

Nicolas

1 ACCEPTED SOLUTION

Hello Paul,



Thanks for the answer. I don't know if your solution would work or not.


Anyway, we found a workaround:


User submits his paramaters.


It creates an event that launches then a Script Action perofrming the process.


At the end of it, the user simply receives an Email.



About the script, this feature is not meant to be used often. It's meant to manually launch recalculations Service Availabilities based on outages on custom instances of Service Offerings in a periode chosen by the user.


At first we had hours of calculation and by changing the availability logic, we reduced it to a few minutes.


View solution in original post

7 REPLIES 7

Chuck Tomasi
Tera Patron

Hi Nicolas.



Are you using a getXML() call or a getXMLWait() to get your GlideAjax info? The former is async, which shouldn't tie up (and timeout) your browser, whereas the latter holds the user hostage while the server is busy. For longer transactions, I recommend getXML() - with a callback function of course, if you can do it.


GlideAjax - ServiceNow Wiki


Hello ctomasi, thank you for the answer.



We are using the getXML() function with a callback because it can be long before receiving back the XML.


But we wanted to provide a feedback to the user when the system finishes its process. Now, after the 300s periode, I think the system continues working. But the user is just not aware when in ends.


Hello,



I take back what I said about the system carrying on with the process. After the 300s it actually stops before ending the script.


This is the message we get when reaching the timeout:


GlideAjax_Timeout.jpg


Any help would be much appreciated.


You can check under System Definition> Transaction Quotas. It may be canceled from there - which you can adjust.



Transaction Quotas - ServiceNow Wiki