After upgrading from v2021.3 (Build 10526) (a custom build for another error) to v2022.1 (Build 2342) we are getting this error during an approval step:
The step failed: Activity UCSB - Approval to Create App on the Octopus Server failed with error 'Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Operation cancelled by user.
The statement has been terminated.
Current transactions:
Transaction 'DeploymentTaskController|ServerTasks-181702-af0ca2f8-5eaa-499e-baf7-5797ac560eb8|T62' Open with 14 commands started at 2022-04-12T16:42:18 (60.24 seconds ago)
2022-04-12T16:42:18 SELECT TOP 1 Id,Name,Description,QueueTime,StartTime,CompletedTime,ErrorMessage,ConcurrencyTag,State,HasPendingInterruptions,HasWarningsOrErrors,ServerNodeId,ProjectId,EnvironmentId,TenantId,DurationSeconds,DataVersion,SpaceId,RunbookId,LastModified,BusinessProcessState,ServerTaskType,JSON FROM [dbo].[ServerTask] WHERE [Id] = @Id
2022-04-12T16:42:18 SELECT TOP 1 Id,Name,Description,QueueTime,StartTime,CompletedTime,ErrorMessage,ConcurrencyTag,State,HasPendingInterruptions,HasWarningsOrErrors,ServerNodeId,ProjectId,EnvironmentId,TenantId,DurationSeconds,DataVersion,SpaceId,RunbookId,LastModified,BusinessProcessState,ServerTaskType,JSON FROM [dbo].[ServerTask] WHERE [Id] = @Id
2022-04-12T16:42:18 SELECT TOP 1 Id,Name,Description,QueueTime,StartTime,CompletedTime,ErrorMessage,ConcurrencyTag,State,HasPendingInterruptions,HasWarningsOrErrors,ServerNodeId,ProjectId,EnvironmentId,TenantId,DurationSeconds,DataVersion,SpaceId,RunbookId,LastModified,BusinessProcessState,ServerTaskType,JSON FROM [dbo].[ServerTask] WHERE [Id] = @Id
2022-04-12T16:42:18 UPDATE [dbo].[ServerTask] SET [Name] = @Name, [Description] = @Description, [QueueTime] = @QueueTime, [StartTime] = @StartTime, [CompletedTime] = @CompletedTime, [ErrorMessage] = @ErrorMessage, [ConcurrencyTag] = @ConcurrencyTag, [State] = @State, [HasPendingInterruptions] = @HasPendingInterruptions, [HasWarningsOrErrors] = @HasWarningsOrErrors, [ServerNodeId] = @ServerNodeId, [ProjectId] = @ProjectId, [EnvironmentId] = @EnvironmentId, [TenantId] = @TenantId, [RunbookId] = @RunbookId, [DurationSeconds] = @DurationSeconds, [SpaceId] = @SpaceId, [LastModified] = @LastModified, [BusinessProcessState] = @BusinessProcessState, [ServerTaskType] = @ServerTaskType, [JSON] = @JSON WHERE [Id] = @Id
2022-04-12T16:42:18 INSERT INTO [dbo].[Event] ([Id], [RelatedDocumentIds], [ProjectId], [EnvironmentId], [TenantId], [Category], [UserId], [Username], [Occurred], [UserAgent], [Message], [SpaceId], [ChangeDetails], [JSONBlob], [JSON]) VALUES
(@Id, @RelatedDocumentIds, @ProjectId, @EnvironmentId, @TenantId, @Category, @UserId, @Username, @Occurred, @UserAgent, @Message, @SpaceId, @ChangeDetails, @JSONBlob, @JSON)
… plus more SQL
I see missing indices in a system integrity check but these same indices are showing up in our working, prod server which has not been updated:
Unexpected item: USER_TABLE dbo.Script0202EnsureArtifactScopesAreConsistent.Created datetimeoffset(10/34/7) 0
Unexpected item: USER_TABLE dbo.Script0202EnsureArtifactScopesAreConsistent.DataVersion timestamp(8/0/0) 0
Unexpected item: USER_TABLE dbo.Script0202EnsureArtifactScopesAreConsistent.EnvironmentId nvarchar(100/0/0) 1
Unexpected item: USER_TABLE dbo.Script0202EnsureArtifactScopesAreConsistent.Filename nvarchar(400/0/0) 0
Unexpected item: USER_TABLE dbo.Script0202EnsureArtifactScopesAreConsistent.Id nvarchar(100/0/0) 0
Unexpected item: USER_TABLE dbo.Script0202EnsureArtifactScopesAreConsistent.JSON nvarchar(-1/0/0) 0
Unexpected item: USER_TABLE dbo.Script0202EnsureArtifactScopesAreConsistent.ProjectId nvarchar(100/0/0) 1
Unexpected item: USER_TABLE dbo.Script0202EnsureArtifactScopesAreConsistent.RelatedDocumentIds nvarchar(-1/0/0) 1
Unexpected item: USER_TABLE dbo.Script0202EnsureArtifactScopesAreConsistent.ServerTaskId nvarchar(100/0/0) 0
Unexpected item: USER_TABLE dbo.Script0202EnsureArtifactScopesAreConsistent.SpaceId nvarchar(100/0/0) 0
Unexpected item: USER_TABLE dbo.Script0202EnsureArtifactScopesAreConsistent.TenantId nvarchar(100/0/0) 1
Unexpected item: VIEW dbo.ServerTaskLocalTime.CompletedTime datetime2(8/27/7) 1
Unexpected item: VIEW dbo.ServerTaskLocalTime.ConcurrencyTag nvarchar(200/0/0) 1
Unexpected item: VIEW dbo.ServerTaskLocalTime.DataVersion timestamp(8/0/0) 0
Unexpected item: VIEW dbo.ServerTaskLocalTime.Description nvarchar(-1/0/0) 0
Unexpected item: VIEW dbo.ServerTaskLocalTime.DurationSeconds int(4/10/0) 0
Unexpected item: VIEW dbo.ServerTaskLocalTime.EnvironmentId nvarchar(100/0/0) 1
Unexpected item: VIEW dbo.ServerTaskLocalTime.ErrorMessage nvarchar(-1/0/0) 1
Unexpected item: VIEW dbo.ServerTaskLocalTime.HasPendingInterruptions bit(1/1/0) 0
Unexpected item: VIEW dbo.ServerTaskLocalTime.HasWarningsOrErrors bit(1/1/0) 0
Unexpected item: VIEW dbo.ServerTaskLocalTime.Id nvarchar(100/0/0) 0
Unexpected item: VIEW dbo.ServerTaskLocalTime.JSON nvarchar(-1/0/0) 0
Unexpected item: VIEW dbo.ServerTaskLocalTime.Name nvarchar(100/0/0) 0
Unexpected item: VIEW dbo.ServerTaskLocalTime.ProjectId nvarchar(100/0/0) 1
Unexpected item: VIEW dbo.ServerTaskLocalTime.QueueTime datetime2(8/27/7) 1
Unexpected item: VIEW dbo.ServerTaskLocalTime.RunbookId nvarchar(100/0/0) 1
Unexpected item: VIEW dbo.ServerTaskLocalTime.ServerNodeId nvarchar(500/0/0) 1
Unexpected item: VIEW dbo.ServerTaskLocalTime.SpaceId nvarchar(100/0/0) 1
Unexpected item: VIEW dbo.ServerTaskLocalTime.StartTime datetime2(8/27/7) 1
Unexpected item: VIEW dbo.ServerTaskLocalTime.State nvarchar(100/0/0) 0
Unexpected item: VIEW dbo.ServerTaskLocalTime.TenantId nvarchar(100/0/0) 1
Missing item: IDX dbo.IX_Blob_BlobId BlobId
Missing item: IDX dbo.IX_Blob_BlobId CLUSTERED 0
Missing item: IDX dbo.IX_Blob_BlobId ExtensionId
Missing item: IDX dbo.IX_DeploymentSettings_DataVersion DataVersion
Missing item: IDX dbo.IX_DeploymentSettings_DataVersion NONCLUSTERED 0
Missing item: IDX dbo.IX_DeploymentSettings_SpaceId_ProjectId CLUSTERED 0
Missing item: IDX dbo.IX_DeploymentSettings_SpaceId_ProjectId ProjectId
Missing item: IDX dbo.IX_DeploymentSettings_SpaceId_ProjectId SpaceId
Missing item: IDX dbo.IX_EventRelatedDocument_EventId_RelatedDocumentIdPrefix EventId
Missing item: IDX dbo.IX_EventRelatedDocument_EventId_RelatedDocumentIdPrefix NONCLUSTERED 0
Missing item: IDX dbo.IX_EventRelatedDocument_EventId_RelatedDocumentIdPrefix RelatedDocumentId
Missing item: IDX dbo.IX_EventRelatedDocument_EventId_RelatedDocumentIdPrefix RelatedDocumentIdPrefix
Missing item: IDX dbo.IX_EventRelatedDocument_RelatedDocumentIdPrefix EventId
Missing item: IDX dbo.IX_EventRelatedDocument_RelatedDocumentIdPrefix NONCLUSTERED 0
Missing item: IDX dbo.IX_EventRelatedDocument_RelatedDocumentIdPrefix RelatedDocumentId
Missing item: IDX dbo.IX_EventRelatedDocument_RelatedDocumentIdPrefix RelatedDocumentIdPrefix
Missing item: IDX dbo.IX_HalibutMessageQueueItem_SequenceNumber CLUSTERED 0
Missing item: IDX dbo.IX_HalibutMessageQueueItem_SequenceNumber Direction
Missing item: IDX dbo.IX_HalibutMessageQueueItem_SequenceNumber Endpoint
Missing item: IDX dbo.IX_HalibutMessageQueueItem_SequenceNumber SequenceNumber
Missing item: IDX dbo.IX_MachineScriptTask_BusinessProcess BusinessProcessState
Missing item: IDX dbo.IX_MachineScriptTask_BusinessProcess LastModified
Missing item: IDX dbo.IX_MachineScriptTask_BusinessProcess NONCLUSTERED 0
Missing item: IDX dbo.IX_MessageBusCursor_ConsumerGroupId ConsumerGroupId
Missing item: IDX dbo.IX_MessageBusCursor_ConsumerGroupId NONCLUSTERED 0
Missing item: IDX dbo.IX_MessageBusEvent_SequenceNumber CLUSTERED 0
Missing item: IDX dbo.IX_MessageBusEvent_SequenceNumber SequenceNumber
Missing item: IDX dbo.IX_Release_SpaceId_ProjectId_ChannelId_Assembled Assembled
Missing item: IDX dbo.IX_Release_SpaceId_ProjectId_ChannelId_Assembled ChannelId
Missing item: IDX dbo.IX_Release_SpaceId_ProjectId_ChannelId_Assembled Id
Missing item: IDX dbo.IX_Release_SpaceId_ProjectId_ChannelId_Assembled NONCLUSTERED 0
Missing item: IDX dbo.IX_Release_SpaceId_ProjectId_ChannelId_Assembled ProjectDeploymentProcessSnapshotId
Missing item: IDX dbo.IX_Release_SpaceId_ProjectId_ChannelId_Assembled ProjectId
Missing item: IDX dbo.IX_Release_SpaceId_ProjectId_ChannelId_Assembled ProjectVariableSetSnapshotId
Missing item: IDX dbo.IX_Release_SpaceId_ProjectId_ChannelId_Assembled SpaceId
Missing item: IDX dbo.IX_Release_SpaceId_ProjectId_ChannelId_Assembled Version
Missing item: IDX dbo.IX_RunbookRunRelatedMachine_RunbookRun_Machine MachineId
Missing item: IDX dbo.IX_RunbookRunRelatedMachine_RunbookRun_Machine NONCLUSTERED 0
Missing item: IDX dbo.IX_RunbookRunRelatedMachine_RunbookRun_Machine RunbookRunId
Missing item: IDX dbo.IX_ServerTask_BusinessProcess BusinessProcessState
Missing item: IDX dbo.IX_ServerTask_BusinessProcess LastModified
Missing item: IDX dbo.IX_ServerTask_BusinessProcess NONCLUSTERED 0
Missing item: IDX dbo.IX_ServerTask_BusinessProcess SpaceId
Missing item: IDX dbo.IX_Subscription_DataVersion DataVersion
Missing item: IDX dbo.IX_Subscription_DataVersion NONCLUSTERED 0