Subject: Flow Error: Transaction Cancelled - Maximum Execution Time Exceeded After Bulk Record Updat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2024 03:43 PM
Hi ServiceNow Community,
I'm currently experiencing an issue with a flow that I’ve built to update a large number of hardware asset records using a REST API call to fetch warranty information. The flow works well, but after about 800 records are updated, I receive the following error: Internal Server Error
When I look at the execution and iterate through the records to the one that it cancelled on, I found the error:
Error: Transaction cancelled: maximum execution time exceeded
Background:
- I’m using a REST step within a flow action to call an external API and retrieve warranty information.
- The flow successfully updates the warranty expiration dates on hardware asset records in the alm_hardware table using the serial number and warranty end date from the API response.
- The flow completes successfully for smaller data sets, but when processing a larger volume (around 800+ records), it throws the "maximum execution time exceeded" error and the flow eventually cancels.
What I’ve Tried:
- I've reviewed my scripts and API response handling. Everything works well in smaller batches, and warranty dates are updated correctly in the system.
- I checked if the error is due to long-running scripts or flows, but I couldn't find the glide.script.timeout system property, which I’ve seen suggested for similar issues.
- I'm wondering if there's a different sys_property related to REST or flow execution limits, or if there's a different approach to avoid hitting the execution timeout limit.
Key Questions:
- Is there a property I can adjust to extend the execution time for flows?
- Would breaking this flow into smaller batches or triggering it differently be a better solution?
- Has anyone else encountered similar "maximum execution time exceeded" errors in bulk record updates, and how did you resolve them?
Additional Info:
- The flow runs with no issues for smaller record sets.
- I’d appreciate any insight or guidance on how to troubleshoot and prevent the flow from timing out when processing larger volumes.
Thanks in advance for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2024 05:54 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2024 04:52 PM
Thanks Danish, unfortunately increasing the REST Attachment API request timeout has not resolved the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2024 07:32 PM
Hi @jamesboding
Refer below links and give this a try :
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0866547
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2024 04:52 PM
Thanks Amit, unfortunately increasing the REST Attachment API request timeout has not resolved the issue.