[ERR] Failed to groom The DELETE statement conflicted with the REFERENCE constraint
PSU version: 4.5.3
I am using a sql backend with 2 nodes
2025-04-14 10:32:25.211 -05:00 [ERR] Failed to groom. Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.SqlClient.SqlException (0x80131904): The DELETE statement conflicted with the REFERENCE constraint "FK_Job_AppToken_AppTokenId". The conflict occurred in database "mydb", table "dbo.Job", column 'AppTokenId'. at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
This is causing groom to fail
I think this happens when the app token is assigned to a job and it’s attempting to delete the app token. I know we have tests for v5 for this but not 100% sure what we need to change for v4. Do you know if the entire groom job fails? we could at least handle the error and continue on…
Adam Driscoll
PowerShell Expert and Developer at Devolutions

This is what im seeing from the admin UI
6579494a2ad16022d4420c65e667f07ead9f4287.png
Is there something I could do to clean up the DB manually to fix this?