Skip to main content
Dynamics 365 Community / Forums / Finance forum / Cloud hosted environme...
Finance forum
Answered

Cloud hosted environment, D365FO 10.0.31 Upgrade, Step 25 Error, Exceeded the execution time limit for the script: InventSysSetup

editSubscribe (0) ShareShare
ReportReport
Posted on by 14

This is the information that I found in the log on my development VM when the upgrade to D365 F&O 10.0.31 failed on step 25. How do I fix this?

02/23/2023 19:57:13: New SyssetupInstaller exception System.AggregateException: One or more errors occurred. ---> Microsoft.Dynamics.Ax.Xpp.TimeoutException: Exceeded the execution time limit for the script: InventSysSetup
   at Microsoft.Dynamics.AX.Framework.Syssetup.SysSetupTaskHelper.<>c__DisplayClass1_0.<ExecuteMethodInNewTask>b__1()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.CancellationCallbackInfo.ExecuteCallback()
   at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean throwOnFirstException)
   --- End of inner exception stack trace ---
   at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean throwOnFirstException)
   at System.Threading.CancellationTokenSource.NotifyCancellation(Boolean throwOnFirstException)
   at Microsoft.Dynamics.AX.Framework.Syssetup.SyssetupInstaller.ExecuteScriptWithTimeout(Int32 scriptId, DictClass syssetupDictClass, String className, Int32 timeout)
   at Microsoft.Dynamics.AX.Framework.Syssetup.SyssetupInstaller.<>c__DisplayClass21_0.<WriteAllData>b__0()
   at Microsoft.Dynamics.AX.Framework.Syssetup.SyssetupRetryHelper.Execute(Action executeMethod, String className)
   at Microsoft.Dynamics.AX.Framework.Syssetup.SyssetupInstaller.WriteAllData()
   at Microsoft.Dynamics.AX.Framework.Syssetup.SyssetupInstaller.loadAllData()
   at Microsoft.Dynamics.AX.Deployment.Setup.AppOperations.RaiseOnDbsyncSyncApplEvent(Action`2 logCallback)
---> (Inner Exception #0) Microsoft.Dynamics.Ax.Xpp.TimeoutException: Exceeded the execution time limit for the script: InventSysSetup
   at Microsoft.Dynamics.AX.Framework.Syssetup.SysSetupTaskHelper.<>c__DisplayClass1_0.<ExecuteMethodInNewTask>b__1()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.CancellationCallbackInfo.ExecuteCallback()
   at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean throwOnFirstException)<---

 

02/23/2023 19:57:18: Application configuration sync failed.    Microsoft.Dynamics.AX.Framework.Database.TableSyncException: Custom action threw exception(s), please investigate before synchronizing again: 'AggregateException:One or more errors occurred.
   at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean throwOnFirstException)
   at System.Threading.CancellationTokenSource.NotifyCancellation(Boolean throwOnFirstException)
   at Microsoft.Dynamics.AX.Framework.Syssetup.SyssetupInstaller.ExecuteScriptWithTimeout(Int32 scriptId, DictClass syssetupDictClass, String className, Int32 timeout)
   at Microsoft.Dynamics.AX.Framework.Syssetup.SyssetupInstaller.<>c__DisplayClass21_0.<WriteAllData>b__0()
   at Microsoft.Dynamics.AX.Framework.Syssetup.SyssetupRetryHelper.Execute(Action executeMethod, String className)
   at Microsoft.Dynamics.AX.Framework.Syssetup.SyssetupInstaller.WriteAllData()
   at Microsoft.Dynamics.AX.Framework.Syssetup.SyssetupInstaller.loadAllData()
   at Microsoft.Dynamics.AX.Deployment.Setup.AppOperations.RaiseOnDbsyncSyncApplEvent(Action`2 logCallback)
   at Microsoft.Dynamics.AX.Deployment.Setup.Program.<RunFullSync>g__RaiseDbSyncEvent|24_8(IMetadataProvider _)
   at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.<>c__DisplayClass34_0.<NOTE_LeavingSynchronizer_CallStackAboveThisLineIsCustomCode>b__0()
   at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.ExecuteWithinAOS(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Func`1 func, Action`1 errorHandler)
Inner exceptions:
TimeoutException:Exceeded the execution time limit for the script: InventSysSetup
   at Microsoft.Dynamics.AX.Framework.Syssetup.SysSetupTaskHelper.<>c__DisplayClass1_0.<ExecuteMethodInNewTask>b__1()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.CancellationCallbackInfo.ExecuteCallback()
   at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean throwOnFirstException)' ---> System.AggregateException: One or more errors occurred. ---> Microsoft.Dynamics.Ax.Xpp.TimeoutException: Exceeded the execution time limit for the script: InventSysSetup
   at Microsoft.Dynamics.AX.Framework.Syssetup.SysSetupTaskHelper.<>c__DisplayClass1_0.<ExecuteMethodInNewTask>b__1()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.CancellationCallbackInfo.ExecuteCallback()
   at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean throwOnFirstException)
   --- End of inner exception stack trace ---
   at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean throwOnFirstException)
   at System.Threading.CancellationTokenSource.NotifyCancellation(Boolean throwOnFirstException)
   at Microsoft.Dynamics.AX.Framework.Syssetup.SyssetupInstaller.ExecuteScriptWithTimeout(Int32 scriptId, DictClass syssetupDictClass, String className, Int32 timeout)
   at Microsoft.Dynamics.AX.Framework.Syssetup.SyssetupInstaller.<>c__DisplayClass21_0.<WriteAllData>b__0()
   at Microsoft.Dynamics.AX.Framework.Syssetup.SyssetupRetryHelper.Execute(Action executeMethod, String className)
   at Microsoft.Dynamics.AX.Framework.Syssetup.SyssetupInstaller.WriteAllData()
   at Microsoft.Dynamics.AX.Framework.Syssetup.SyssetupInstaller.loadAllData()
   at Microsoft.Dynamics.AX.Deployment.Setup.AppOperations.RaiseOnDbsyncSyncApplEvent(Action`2 logCallback)
   at Microsoft.Dynamics.AX.Deployment.Setup.Program.<RunFullSync>g__RaiseDbSyncEvent|24_8(IMetadataProvider _)
   at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.<>c__DisplayClass34_0.<NOTE_LeavingSynchronizer_CallStackAboveThisLineIsCustomCode>b__0()
   at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.ExecuteWithinAOS(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Func`1 func, Action`1 errorHandler)
   --- End of inner exception stack trace ---
   at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.<>c.<NOTE_LeavingSynchronizer_CallStackAboveThisLineIsCustomCode>b__34_1(Tuple`2 result)
   at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.ExecuteWithinAOS(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Func`1 func, Action`1 errorHandler)
   at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.NOTE_LeavingSynchronizer_CallStackAboveThisLineIsCustomCode(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Action`1 a)
   at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.RunCustomAction(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Action`1 a)
   at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.PostTableSync()
   at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.FullSync()
   at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.RunSync()
   at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.Run(String metadataDirectory, String sqlConnectionString, SyncOptions options)
02/23/2023 19:57:19: The operation failed.

Attachments
  • Verified answer
    Cloud hosted environment, D365FO 10.0.31 Upgrade, Step 25 Error, Exceeded the execution time limit for the script: InventSysSetup
    This has been an ongoing issue for us in each new version. While I have not found a solution to the issue, I have found the following workaround which has allowed us to proceed with the upgrade process:
     

    Step 25 - Database synchronization timeout error

    This is probably the most common version upgrade error. Rather than fixing the issue, we are able to comment out the code that causes the error and bypass the database synchronization. Following the completion of the update, the database should be synchronized manually.

    To bypass the synchronization:

    1. Navigate to K:\Deployable packages
    2. Open the most recent package in that folder (which should be the one that failed). If there are more than one for the same GUID, you may want to edit the script in each one to be sure you get the one that will be executed.
    3. Edit the AutoDeployReportAndSyncDB.ps1 Windows PowerShell script file.
    4. Comment out (using # symbols) the following lines of code:
    #db sync
    $dbSyncScriptPath = "$PSScriptRoot\AutoDBSync.ps1"
    $dbSyncScriptPath = Resolve-Path -Path $dbSyncScriptPath
    
    & $dbSyncScriptPath -LogDir $LogDir -ActivityId $ActivityId -AxDRConnectionString $AxDRConnectionString -EnabledServicingFeatures $EnabledServicingFeatures -RunbookId $RunbookId -Credentials $Credentials
    
    1. Save the script and resume the upgrade. Note that if you aborted the update and need to restart it, a new package will be added (and you will need to update the scripts in it before the upgrade kicks you out of the VM).
  • Suggested answer
    Navneeth Nagrajan Profile Picture
    Navneeth Nagrajan 1,168 on at
    Cloud hosted environment, D365FO 10.0.31 Upgrade, Step 25 Error, Exceeded the execution time limit for the script: InventSysSetup
    Hi,
     
    Suggestions in line:
     
    Happy to answer questions, if any. 
  • Suggested answer
    Ariston Javier Profile Picture
    Ariston Javier 34 on at
    Cloud hosted environment, D365FO 10.0.31 Upgrade, Step 25 Error, Exceeded the execution time limit for the script: InventSysSetup
    Run below script in AXDB Database.

    INSERT INTO DBO.SYSFLIGHTING (FLIGHTNAME, ENABLED, FLIGHTSERVICEID)
    VALUES ('DbSyncSysSetupTimeoutKillSwitch', 1, 12719367)

    It works to me!

  • Ariston Javier Profile Picture
    Ariston Javier 34 on at
    Cloud hosted environment, D365FO 10.0.31 Upgrade, Step 25 Error, Exceeded the execution time limit for the script: InventSysSetup
    Got same issue upgrading version 10.0.36 to 10.0.39 
    Appreciate anyone can share fixes.
  • Deepak Agarwal Profile Picture
    Deepak Agarwal 89 on at
    Cloud hosted environment, D365FO 10.0.31 Upgrade, Step 25 Error, Exceeded the execution time limit for the script: InventSysSetup
    Try if below helps, although its not on same version. 
     
  • Cloud hosted environment, D365FO 10.0.31 Upgrade, Step 25 Error, Exceeded the execution time limit for the script: InventSysSetup
    Hi,
     
    im having the same issue. did you get this resolved?
  • Jaffar Profile Picture
    Jaffar 4 on at
    Cloud hosted environment, D365FO 10.0.31 Upgrade, Step 25 Error, Exceeded the execution time limit for the script: InventSysSetup
    Thanks All for your reply. 
     
    I tried to restarted the VM and I confirmed it has enough space.
     
    the previous version is 10.0.32.
     
     
  • Komi Siabi Profile Picture
    Komi Siabi 12,241 Super User on at
    Cloud hosted environment, D365FO 10.0.31 Upgrade, Step 25 Error, Exceeded the execution time limit for the script: InventSysSetup
    Hi, 
     
    Make sure VS is not opened while the deployment is on.  Try the retry button.
    Also can you tell her the current version you are on before the upgrade?
  • Andre Arnaud de Calavon Profile Picture
    Andre Arnaud de Cal... 283,126 Super User on at
    Cloud hosted environment, D365FO 10.0.31 Upgrade, Step 25 Error, Exceeded the execution time limit for the script: InventSysSetup
    Hi Jaffar,
     
    Did you try to resume the deployment and checked if it would then continue? If not, check if a bigger size for the VM will help.
  • Jaffar Profile Picture
    Jaffar 4 on at
    Cloud hosted environment, D365FO 10.0.31 Upgrade, Step 25 Error, Exceeded the execution time limit for the script: InventSysSetup
    Hi,
     
    im having the same issue. did you get this resolved?

Helpful resources

Quick Links

New Blog Features Released!

Check out the new community blog features for viewers and authors…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,126 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,646 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Featured topics

Product updates

Dynamics 365 release plans