Try Now
More in this section

Forums / Bugs & Issues / Sitefinity 7.3 scheduled tasks giving lot of dead lock exception

Sitefinity 7.3 scheduled tasks giving lot of dead lock exception

2 posts, 0 answered
  1. Praneeth
    Praneeth avatar
    26 posts
    22 Jun 2012
    11 May 2015
    Link to this post

    Hi Team,

     I have set up a scheduled task job and in the logs I see that lot of dead lock exceptions like below are occurring. However, the tasks seem to be executing fine. Any thoughts on this?



    Message: Scheduler : ExecuteAllTasks , Exception Message Telerik.OpenAccess.RT.sql.SQLException: Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. ---> System.Data.SqlClient.SqlException: Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
       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.TryHasMoreRows(Boolean& moreRows)
       at System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more)
       at System.Data.SqlClient.SqlDataReader.Read()
       at OpenAccessRuntime.Intellitrace.Read(DbDataReader reader, String id)
       at Telerik.OpenAccess.Runtime.Logging.LoggingDbDataReader.Read()
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.ResultSetImp.next()
       --- End of inner exception stack trace ---
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.ResultSetImp.next()
       at OpenAccessRuntime.Relational.fetch.FetchResultImp.hasNext()  : StackTrace :    at OpenAccessRuntime.ExceptionWrapper.Throw()
       at OpenAccessRuntime.storagemanager.logging.LoggingStorageManager.fetchNextQueryResult(ApplicationContext context, RunningQuery runningQuery, Int32 skipAmount)
       at OpenAccessRuntime.DataObjects.ForwardQueryResult.Initialize()
       at OpenAccessRuntime.DataObjects.ForwardQueryResult.get_Item(Int32 indexParam)
       at OpenAccessRuntime.ListEnumerator.setCurrent(Int32 _pos)
       at OpenAccessRuntime.ListEnumerator.Move(Int32 relative)
       at Telerik.OpenAccess.Query.TypedEnumerator`1.MoveNext()
       at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
       at Telerik.Sitefinity.Scheduling.SchedulingManager.GetTasksFromAllProviders(Expression`1 whereFilter, String transactionName)
       at Telerik.Sitefinity.Scheduling.Scheduler.InternalTimerElapsed(Object[] parameters)

  2. Sabrie Nedzhip
    Sabrie Nedzhip avatar
    534 posts
    17 Aug 2017
    14 May 2015
    Link to this post
    Hello Praneeth,

    It is really hard to say what is the exact reason for the issue you are experiencing. Can you please let me know more details about the scheduled task you are running? It is possible that during the execution of the scheduled task you are also trying to edit the items for example in the backend which will lock the items.

    In addition to this, can you please delete the files under the ~/App_Data/Sitefinity/Logs folder (or copy the files to another location for backup) and then try to execute the scheduled task and let me know if there are any errors logged in the Logs folder. This way we can see if the issue reproduces every time a scheduled task is executed.

    Please make sure that you do not edit any content in the backend and that there no items locked when executing the scheduled task.

    Sabrie Nedzhip
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
2 posts, 0 answered