Issue in Workflow: Getting message Workflow 'workflow name' with context 'sys_id' terminated 2019-03-05 05:54:43 UTC with : Transaction cancelled: maximum execution time exceeded

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2019 11:30 PM
Hi Team,
Am facing an issue in my PROD instance.I have a workflow on release management table where in an activity, script execution will take place and looks like the script taken much time to execute and throws below error:
Issue in Workflow: Getting message Workflow 'workflow name' with context 'sys_id' terminated 2019-03-05 05:54:43 UTC with : Transaction cancelled: maximum execution time exceeded
Please let me know how to over come this issue.
Appreciate your help,.
Thanks,
Suresh
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2019 11:56 AM
I don't think there's a configurable execution time property in the system, so the next best thing is start chipping away at what makes the scripts so time intensive. Any chance you could post those?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2019 07:06 PM
Hi Rob,
Thanks for reply!!
In the workflow we have an activity which does lots of work i.e creating Change Tasks, Creating some other records etc. every time it was taking 200 seconds, but last time it took 300 seconds and the workflow got cancelled with above message.
I am suspecting we have to increase quota time for the UI transactions. currently we have quota time as 298 seconds and later workflow gets cancelled can this be increased to 500. if yes, what would be impact, thanks
Thanks,
Suresh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2023 11:12 AM
Hello Suresh,
We face the same issue in Prod instance.
Were you able to find a possible solution for your issue? If yes can you please provide the steps here as it might be helpful.
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2023 01:37 PM
The error message "Transaction cancelled: maximum execution time exceeded" indicates that a script in your workflow has taken longer than the allowed execution time limit to run, and as a result, the transaction was cancelled.
Here are some steps you can take to resolve the issue:
Identify the script: Determine which script in the workflow is causing the issue by reviewing the code and timing how long it takes to run.
Optimize the script: If the script is taking too long to run, try to optimize it by reducing the number of database queries, using more efficient algorithms, or breaking the script down into smaller, more manageable parts.
Increase the transaction time limit: If optimizing the script is not possible, you can try to increase the transaction time limit in your instance. This can be done by navigating to "System Properties" in the "System" section of the ServiceNow navigation menu and increasing the value for "glide.transaction.max_timeout".
Break the workflow into multiple workflows: If the script cannot be optimized and increasing the transaction time limit is not an option, you may need to break the workflow into multiple workflows, each with its own execution time limit, to ensure that the process can run smoothly.
It's recommended to test these steps in a development instance before implementing them in your production instance to minimize the risk of disrupting production processes. If you are not familiar with the script or workflow, it's recommended to consult with a ServiceNow professional or the ServiceNow support team.