Facing the issue after upgrade.
Current Version: 2021.1.7738
System.Exception: Error while executing SQL command in transaction 'ModifyResponder ProjectModifyResponder': Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The statement has been terminated.
The command being executed was:
DELETE FROM [dbo].[EventRelatedDocument]
WHERE ([EventId] = @eventid)
---> Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The statement has been terminated.
If there are no errors there, 2021.1 actually increased the memory usage that Octopus requires on your SQL Server. Could we please check your SQL Server Metrics to make sure that we have a lot of capacity left there?
It might also be a good idea to check your SQL Fragmentation. There is a Community Step Template called SQL Server Fragmentation Query that if you run it, it will give you the fragmentation. We can take a look at that and see if it’s high or not.
Please run the following queries to recreate the missing indexes. Please take a backup of your SQL DB before you run these queries. We don’t typically like to modify the SQL DB manually as there can be unintended consequences so we only do it when absolutely necessary. Once you’ve created the Indexes, please run the system integrity check and let me know if it’s working.
CREATE INDEX IX_DeploymentSettings_DataVersion ON DeploymentSettings(DataVersion)
CREATE UNIQUE CLUSTERED INDEX IX_DeploymentSettings_SpaceId_ProjectId ON DeploymentSettings(ProjectId, SpaceId)
CREATE INDEX IX_EventRelatedDocument_RelatedDocumentIdPrefix ON EventRelatedDocument(RelatedDocumentIdPrefix, RelatedDocumentId, EventId)
CREATE INDEX IX_EventRelatedDocument_EventId_RelatedDocumentIdPrefix ON EventRelatedDocument(EventId, RelatedDocumentIdPrefix, RelatedDocumentId)
CREATE INDEX IX_Release_SpaceId_ProjectId_ChannelId_Assembled ON Release(SpaceId, ProjectId, ChannelId, Assembled, Id, Version, ProjectVariableSetSnapshotId, ProjectDeploymentProcessSnapshotId)
CREATE INDEX IX_Subscription_DataVersion ON Subscription(DataVersion)