We recently started getting a number of primary key violations in our event logs. Has anyone seen these before, know what the cached_overdue_predictions table is used for or how to correct this? Everything 'seems' to be working fine on our Forms server otherwise.
Violation of PRIMARY KEY constraint 'PK_cached_overdue_predictions'. Cannot insert duplicate key in object 'dbo.cached_overdue_predictions'. The duplicate key value is (294738, 0).
Thanks
The full error message:
Entity Framework returned the following error when trying to communicate with SQL Server: An error occurred while executing the command definition. See the inner exception for details.. [LFF18-EntityFrameworkInaccessible] Details: URL: Error: EntityFrameworkInaccessible Date: 3/21/2018 10:58:49 AM (Mountain Standard Time) HTTP Status Code: 500 Business Process ID: 0 Business Process Name: Stack Trace: Caught exception: Laserfiche.Forms.CommonUtils.Exceptions.LFFormsException Message: Entity Framework returned the following error when trying to communicate with SQL Server: An error occurred while executing the command definition. See the inner exception for details.. [LFF18-EntityFrameworkInaccessible] Inner exception: System.Data.Entity.Core.EntityCommandExecutionException Message: An error occurred while executing the command definition. See the inner exception for details. at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.Execute(EntityCommand entityCommand, CommandBehavior behavior) at System.Data.Entity.Core.EntityClient.EntityCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Entity.Core.EntityClient.EntityCommand.ExecuteNonQuery() at System.Data.Entity.Core.Objects.ObjectContext.ExecuteFunctionCommand(EntityCommand entityCommand) at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass4b.<ExecuteFunction>b__49() at System.Data.Entity.Infrastructure.DbExecutionStrategy.Execute[TResult](Func`1 operation) at System.Data.Entity.Core.Objects.ObjectContext.ExecuteFunction(String functionName, ObjectParameter[] parameters) at Laserfiche.Forms.EntityModels.FormsEntities.GetCycleTimeOverduePrediction(Nullable`1 bp_id, Nullable`1 process_id, Nullable`1 step_id, Nullable`1 user_id, Nullable`1 hours_till_due, Nullable`1 hours_till_due_excluding_weekends, Nullable`1 history_id) at Laserfiche.Forms.CommonUtils.Predictions.FormsCycleTimeOverdue.RunPrediction() at Laserfiche.Forms.Routing.Prediction.UpdatePredictions(Object parameter) Inner exception: System.Data.SqlClient.SqlException Message: Violation of PRIMARY KEY constraint 'PK_cached_overdue_predictions'. Cannot insert duplicate key in object 'dbo.cached_overdue_predictions'. The duplicate key value is (294738, 0). Violation of PRIMARY KEY constraint 'PK_cached_overdue_predictions'. Cannot insert duplicate key in object 'dbo.cached_overdue_predictions'. The duplicate key value is (294738, 1). The statement has been terminated. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed) at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext) at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)