Script Include Process Time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
I have a script include which utilizes Rest Message.
Sometimes it stops running at the middle of execution without an error.
Is there a maximum process time or maximum json reponse limit ServiceNow can handle?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
may be the response is huge or the time it takes to get response is huge
what's your debugging and findings?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hello @ChezAndrewI0898
The issue occurs because ServiceNow enforces a 30‑second max timeout for outbound REST calls when the property glide.http.outbound.max_timeout.enabled is true.
To allow longer REST processing, ServiceNow recommends:
- Set glide.http.outbound.max_timeout.enabled = false
- Then use waitForResponse() to specify a higher timeout for that specific REST call.
For Additional information please check these links
Solved: How to increase the timeout for a REST response? (... - ServiceNow Community
How to configure default response timeout for outbound async REST and SOAP messages - Support and Tr...If my response helped mark as helpful and accept the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hello @ChezAndrewI0898 ,
Try using executeAsync() instead of execute().
You may refer this :
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0716391
If my response helped mark as helpful and accept the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi @ChezAndrewI0898,
Yes, ServiceNow does enforce execution and timeout limits for outbound REST calls, and what you’re seeing is usually related to one of those rather than a strict JSON size limit.
Or there is no single documented “maximum JSON response size” for RESTMessageV2, but very large responses can indirectly cause the following:
i. Timeouts
ii. Memory pressure
iii. Slow parsing
iv. Transaction cancellation
If you find my answer useful, please mark it as Helpful and Correct 😊
Regards,
Soham Tipnis
ServiceNow Developer || Technical Consultant
LinkedIn: www.linkedin.com/in/sohamtipnis10
