Home
About
Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home

Script Execution was Stopped Due to a Timeout Error

Last updated on 14 July 2023

M-Files Admin

Overview

If the following error is found in the Windows Event Viewer the main part to pay attention to is:

Script execution was stopped due to a timeout.

(Full error at end of article)

Solution

The main way around this issue is to go to the following section seen in the screenshot below (Configurations > Advanced Vault Settings > Scripting) and change the "Script Timeout" above whatever value is currently set there.

If it reads as 90, then change it up to 120 or so. If it says 120, change it up to 150. Every incremental step above what it's currently set at will allow scripts to run that much longer but also require that much more resources from the server. 

Please review the error stack to see what event handlers the object goes through to try to evaluate what logic in the vault may be taking so long, why, and how to optimize it.

NOTE: This means if it's set too high, it could lock up all resources on the server and result in poor performance or server lock.
Each script that runs for a long time can consume an entire CPU core, so long-running scripts can easily exhaust the computational resources of the server.

NOTE 2: Often optimizing the task that takes too long or eliminating another bottleneck in the resourcing of the system that delays this particular task is the way to solve such an error, not keeping a high script timeout. 

image.png

Full Error Stack:

M-Files Online
VAULT {<vault guid>}
 
Refreshing the user group "DOMAIN\Some Large AD Group [DOMAIN\Some Large AD Group]" failed.
Script execution was stopped due to a timeout.
 
RPCUserGroupsHelper.cpp, 5463, Refreshing the user group "DOMAIN\Some Large AD Group [DOMAIN\Some Large AD Group]" failed. (0x8004012E)
MCallInLoop.h, 712, Refreshing the user group "DOMAIN\Some Large AD Group [DOMAIN\Some Large AD Group]" failed. (0x8004012E)
RPCUserGroupsHelper.cpp, 5520, Refreshing the user group "DOMAIN\Some Large AD Group [DOMAIN\Some Large AD Group]" failed. (0x8004012E)
RPCUserGroupsHelper.cpp, 5520, Script execution was stopped due to a timeout. (0x80040835)
RPCUserGroupsHelper.cpp, 3707, Script execution was stopped due to a timeout. (0x80040835)
RPCUserGroupsHelper.cpp, 2276, Script execution was stopped due to a timeout. (0x80040835)
VaultDBSessionEvents.cpp, 1089, Script execution was stopped due to a timeout. (0x80040835)
VaultDBSessionEvents.cpp, 1625, Script execution was stopped due to a timeout. (0x80040835)
VaultScriptSessionTemplates.cpp, 384, Script execution was stopped due to a timeout. (0x80040835)
VaultScriptSessionTemplates.cpp, 501, Script execution was stopped due to a timeout. (0x80040835)
CoActiveScriptSite.cpp, 893, Script execution was stopped due to a timeout. (0x80040835)
CoActiveScriptSite.cpp, 735, Script execution was stopped due to a timeout. (0x80040835)
AfterModifyUserGroup::MFiles.ComplianceKit.MFEventHandlerAfterModifyUserGroup, 22, Script execution was stopped due to a timeout. (0x80040835)
CoDynamicCLRObjectWrapper.cpp, 552, Script execution was stopped due to a timeout. (0x80040835)
CoDynamicCLRObjectWrapper.cpp, 322, Script execution was stopped due to a timeout. (0x80040835)
ManagedError.cpp, 144, Script execution was stopped due to a timeout. (0x80040835)
VaultApplicationBase.cs, 224 (IL:88), Script execution was stopped due to a timeout. (0x80040835)
VaultApplicationBase.cs, 642 (IL:1), Script execution was stopped due to a timeout. (0x80040835)
VaultApplicationBase.cs, 669 (IL:101), Script execution was stopped due to a timeout. (0x80040835)
MethodInfo.cs, 228 (IL:116), Script execution was stopped due to a timeout. (0x80040835)
UserSynchronizationModule.cs, 627 (IL:296), Script execution was stopped due to a timeout. (0x80040835)
UserObject.cs, 308 (IL:315), Script execution was stopped due to a timeout. (0x80040835)
M-Files Compliance Kit 19.3.810.20: [MFilesAPI.ObjectVersionAndProperties SetProperties(MFilesAPI.ObjVer, MFilesAPI.PropertyValues)], IL:-1, Script execution was stopped due to a timeout. (0x80040835)
CoVaultObjectPropertyOperations.cpp, 381, Script execution was stopped due to a timeout. (0x80040835)
CoVaultObjectPropertyOperations.cpp, 406, Script execution was stopped due to a timeout. (0x80040835)
CoVaultObjectPropertyOperations.cpp, 475, Script execution was stopped due to a timeout. (0x80040835)
ServerVaultObjectPropertyOperationsHelper.cpp, 415, Script execution was stopped due to a timeout. (0x80040835)
RPCObjectOperationsHelper.cpp, 109, Script execution was stopped due to a timeout. (0x80040835)
CoRPCOverCOM.cpp, 6106, Script execution was stopped due to a timeout. (0x80040835)
RPCDocumentOperations.cpp, 7383, Script execution was stopped due to a timeout. (0x80040835)
MCallInLoop.h, 712, Script execution was stopped due to a timeout. (0x80040835)
RPCDocumentOperationsHelper.cpp, 3926, Script execution was stopped due to a timeout. (0x80040835)
RPCDocumentOperationsHelper.cpp, 3493, Script execution was stopped due to a timeout. (0x80040835)
RPCDocumentOperationsHelper.cpp, 8930, Script execution was stopped due to a timeout. (0x80040835)
RPCDocumentOperationsHelper.cpp, 9524, Script execution was stopped due to a timeout. (0x80040835)
VaultDBSessionEvents.cpp, 378, Script execution was stopped due to a timeout. (0x80040835)
VaultDBSessionEvents.cpp, 1553, Script execution was stopped due to a timeout. (0x80040835)
VaultScriptSessionTemplates.cpp, 269, Script execution was stopped due to a timeout. (0x80040835)
VaultScriptSessionTemplates.cpp, 334, Script execution was stopped due to a timeout. (0x80040835)
VaultScriptSessionTemplates.cpp, 451, Script execution was stopped due to a timeout. (0x80040835)
VaultTrTrackerHelper.cpp, 573, Script execution was stopped due to a timeout. (0x80040835)
VaultTrTrackerHelper.cpp, 1262, Script execution was stopped due to a timeout. (0x80040835)
(M-Files <version>)

Still need help?

On this page