Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

PageCriteriaQueryService.FindPagesWithCriteria failing with wait operation timed out

Vote:
 
Hi,

I just starting having this issue with the PageCriteriaQueryService.FindPagesWithCriteria.

It works well on my development machine, local sql server and website, even when I grab the test database it all works fine.
I can point my local site the test database and then it fails also.

It fails with:
[Win32Exception (0x80004005): The wait operation timed out]

[SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +392
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +815
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4515
   System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more) +660
   System.Data.SqlClient.SqlDataReader.Read() +37
   EPiServer.DataAccess.ContentListDB.ReadCustomProperties(DbDataReader reader, Dictionary`2 allFetchedItems, Boolean isReadingVersions) +800
   EPiServer.DataAccess.ContentListDB.ReadPublishedList(DbCommand cmd) +317
   EPiServer.DataAccess.<>c__DisplayClass24.b__23() +729
   EPiServer.Data.Providers.<>c__DisplayClass1`1.b__0() +60
   EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute(Func`1 method) +1265
   EPiServer.DefaultContentProvider.BatchLoad(IList`1 contentLinks, Func`2 dbLoader) +303
   EPiServer.DefaultContentProvider.LoadContents(IList`1 contentReferences, ILanguageSelector selector) +562
   EPiServer.Core.ContentProvider.GetScatteredContents(IEnumerable`1 contentLinks, ILanguageSelector selector) +486
   EPiServer.Core.ContentProvider.LoadBatched(IList`1 contentReferences, ILanguageSelector selector) +222
   EPiServer.Core.DefaultContentLoader.GetItems(IEnumerable`1 contentLinks, LoaderSettings loaderSettings) +770
   EPiServer.DataAbstraction.SearchPages.FindAllPagesWithCriteria(PageReference pageLink, PropertyCriteriaCollection criterias, String languageBranch, ILanguageSelector selector) +312
   EPiServer.Core.DefaultPageCriteriaQueryService.FindPagesWithCriteriaInternal(PageReference pageLink, PropertyCriteriaCollection criterias, String languageBranch, ILanguageSelector selector, FindPagesWithCriteriaDelegate findPagesDelegate) +499
   EPiServer.Core.DefaultPageCriteriaQueryService.FindPagesWithCriteria(PageReference pageLink, PropertyCriteriaCollection criterias, String languageBranch, ILanguageSelector selector) +152

At the time I am simply trying to find pages of a certain pagetype.

In total the site only contains 2900 pages.

Any ideas why it might be failing on the test environment ?

regards,
Danny

                    
#113101
Nov 13, 2014 9:51
Vote:
 

You could try to rebuild the sql indexes for the test database (if you google for sql server rebuild index you will find scripts for how to do it).

#113143
Nov 14, 2014 8:12
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.