DLM Automation 2

Timeout expired error

The following error text appears when running a DLM Automation PowerShell cmdlet or add-on:

Example

WARNING: Error 'Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.' 
...
+ FullyQualifiedErrorId : SqlScriptExecutionError,RedGate.DLMAutomation.PowerShell.Commands.UseDatabaseReleaseCommand

Before following the instructions on this troubleshooting page, check the error log includes both the lines shown in the example above. This bottom line shows which Powershell cmdlet has caused the timeout error. In this example, the error is caused by the Use-DlmDatabaseRelease cmdlet.

Cause

One of the batches in the update script took longer to execute than the execution timeout duration (set by default to 30 seconds).

Fix

Increase the duration of the execution timeout by adding the -QueryBatchTimeout parameter to the failing cmdlet.

The value of the -QueryBatchTimeout is in seconds. A value of zero indicates no timeout.

If you're using one of the DLM Automation add-ons, such as the Octopus Deploy step templates, increase the value for the Query batch timeout parameter.


Didn't find what you were looking for?