Primary key constraints all over te place

Yesterday we virtualized a physical machine hosting Octopus into a VM. The VM has been working fine and we have successfully deployed applications today. Out of nothing Octopus started throwing Primary key constraint errors all over the place.

My first impuls was to put Octopus in maintenance mode, so I could investigate the issue. Even this action failed with the following error:

Error while executing SQL command in transaction ‘MaintenanceConfigurationUpdateAction’: Violation of PRIMARY KEY constraint ‘PK_Event_Id’. Cannot insert duplicate key in object ‘dbo.Event’. The duplicate key value is (Events-143300). The statement has been terminated. The command being executed was: 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) SQL Error 2627 - Violation of PRIMARY KEY constraint ‘PK_Event_Id’. Cannot insert duplicate key in object ‘dbo.Event’. The duplicate key value is (Events-143300). The statement has been terminated.

Please advise.

Kind regards,
Raymond

Hi Raymond,

Thank you for reaching out to us, both here and by e-mail, with your primary key constraint question. I just wanted to post a quick note to confirm that I have replied to you via e-mail.

Please let me know if you have any questions.

Best Regards,

Charles

Hi Charles,

Let’s move this topic to mail then. I have replied with additional info.

Best regards,
Raymond

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.