Dnn.Platform: Purge Scheduled History fails with timeout error on 2 instances of DNN 9.4.1

Description of bug

Purge Scheduled History fails with timeout error on 2 instances of DNN 9.4.1

Error log

General Exception

AbsoluteURL DefaultDataProvider DotNetNuke.Data.SqlDataProvider DotNetNuke AbsoluteURL: DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke Message:Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

StackTrace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 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.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at PetaPoco.Database.ExecuteInternal(CommandType commandType, String sql, Object[] args) at DotNetNuke.Data.PetaPoco.PetaPocoHelper.ExecuteNonQuery(String connectionString, CommandType type, Int32 timeoutSec, String sql, Object[] args) at DotNetNuke.Data.SqlDataProvider.ExecuteNonQuery(Int32 timeoutSec, String procedureName, Object[] commandParameters) at DotNetNuke.Services.Scheduling.DNNScheduler.PurgeScheduleHistory() at DotNetNuke.Services.Scheduling.PurgeScheduleHistory.DoWork()

InnerMessage:The wait operation timed out Source:.Net SqlClient Data Provider

Additional context

both are upgraded versions of DNN CE

Affected version

  • 10.0.0 alpha build
  • 9.4.2 alpha build
  • [x ] 9.4.1 latest supported release

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 32 (32 by maintainers)

Most upvoted comments

@sleupold You are absolutely right, but… the ideal situation almost never exists, so we have to work with a non optimized situation.

Can we start working on a better solution for the cleanup of the eventlog?

@thabaum, if you want to purge the schedule history, you should just execute TRUNCATE TABLE {databaseOwner}[{objectQualifier}ScheduleHistory] in BersonaBar > Settings > SQL console.

Purging Eventlog is a different task, and due to some changes in DNN 7.4, you may use my TruncateEventlog script (which does not require TurboScripts to be installed). My TurboScripts however try to provide better automated maintenance of the log tables, but require proper application of the scripts (and I am still working on the version for DNN 9.4.x)