SQL Change Automation 4

Timeout expired error

The following error text appears when running a SQL Change 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.Versioning.Automation.PowerShell.Commands.UseDatabaseReleaseArtifactCommand

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-DatabaseRelease 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 SQL Change Automation add-ons, increase the value for the Query batch timeout parameter.


Didn't find what you were looking for?