Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Timeout issue with inbound REST API

tesnimk
Tera Contributor

Hi All,

 

I am running into an issue where my API calls "/api/now/table/incident" are timing out.

As far as I understood , it could be an issue related to payload size and data volume 

 

My question here is what is the payload size limit to prevent such issue?

 

BR

5 REPLIES 5

k_lutz
Tera Guru

So, you can adjust the sizing but the issue may be more in the overall structure of your API call.

Please check out this link for more information for the sizing property:
https://www.servicenow.com/docs/bundle/zurich-api-reference/page/integrate/custom-web-services/refer...

It looks like the default for glide.rest.max_content_length is 10 MB.

You could also be running into the Transaction Quota Rules timeout for REST API which is 60 seconds I think by default.

Not sure what you are exactly doing but you would probably want to look at pagination logic as well to walk through the records in chunks. Again, it may be the setup is trying to do too much in a single call and increasing sizing may not be the best approach on a design that could be improved.

tesnimk
Tera Contributor

Thanks for your reply.

The raison for which I think the sizing might be a solution, is that the same call was successful whenever I decrease data within the POST payload.  

That's why I need to know what a maximum limit size could be to avoid such an issue.

 

BR

tesnimk
Tera Contributor

Thanks for your reply.

The raison for which I think the sizing might be a solution, is that the same call was successful whenever I decrease data within the POST payload.  

That's why I need to know what a maximum limit size could be to avoid such an issue.

BR

Sheldon  Swift
ServiceNow Employee
ServiceNow Employee

Hi @tesnimk - Can you share the use case or business requirement? The platform enforces limits intentionally, so if the API is timing out, the right solution may be adjusting how the data is queried rather than increasing a limit.