SQL Timeout on Archive functionality

Vote:
 

Hi, I am investigating an issue we have in production with EPiServer CMS 6 R2. It is not patched to the latest service pack yet (running version 6.1.379.1).

We have the in-built archiving function scheduled to run every 6 hours. However, every time it runs, it fails, due to a SQL timeout exception. This occurs 10 minutes after the job starts. It used to run fine, so I assume that the volume of pages in the site has now increased to the point that this job triggers a SQL command that takes longer than 10 minutes to complete. .NET detects this as a timeout and throws an exception.

I have pasted in the stack trace below.

Most solutions I can find for this involve altering the timeout on the SQL Command (http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.commandtimeout.aspx). However, as this is EPiServer code I cannot alter that.

Can anyone tell me how to extend this timeout or otherwise resolve the problem?

Thanks,

Paul

2013-01-28 01:09:39,496 ERROR [112] EPiServer.DataAbstraction.ScheduledJob.ExecuteStaticMethod - 3.1.2 Failed to execute job 34c48aa2-2eb2-46f4-9f79-8440c1f2dbe5
System.Data.SqlClient.SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not
responding.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   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)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   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.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at EPiServer.DataAccess.AbstractCommand.ExecuteReader(Int32 resultSetCount)
   at EPiServer.DataAccess.PropertySearchDB.ExecuteCriteria(Int32 pageID, PropertyCriteria criteria, String languageBranch)
   at EPiServer.DataAccess.PropertySearchDB.CriteriaSearch(Int32 pageID, PropertyCriteria criteria, Boolean firstQuery, HashSet`1 pageLinks, String languageBranch)
   at EPiServer.DataAccess.PropertySearchDB.<>c__DisplayClass4.<FastFindPagesWithCriteria>b__3()
   at EPiServer.DataAccess.DataAccessBase.<>c__DisplayClass1`1.<Execute>b__0()
   at EPiServer.DataAccess.DatabaseFactory.Execute[TResult](Action`1 method)
   at EPiServer.DataAbstraction.SearchPages.FindAllPagesWithCriteria(PageReference pageLink, PropertyCriteriaCollection criterias, String languageBranch, ILanguageSelector selector)
   at EPiServer.LocalPageProvider.FindAllPagesWithCriteria(PageReference pageLink, PropertyCriteriaCollection criterias, String languageBranch, ILanguageSelector selector)
   at EPiServer.DataFactory.FindPagesWithCriteriaInternal(PageReference pageLink, PropertyCriteriaCollection criterias, String languageBranch, ILanguageSelector selector, FindPagesWithCriteriaDelegate findPagesDelegate)
   at EPiServer.DataFactory.FindAllPagesWithCriteria(PageReference pageLink, PropertyCriteriaCollection criterias, String languageBranch, ILanguageSelector selector)
   at EPiServer.Util.PageArchiveJob.Execute()

 

#65375
Jan 28, 2013 14:02
Vote:
 

There is a setting on siteSettings where you can specify the timeout, please see http://sdk.episerver.com/library/cms5/html/P_EPiServer_Configuration_Settings_DatabaseQueryTimeout.htm

#65379
Jan 28, 2013 15:58
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.