SharePoint Hybrid Search Remote SharePoint Provider Query Timeout

%3CLINGO-SUB%20id%3D%22lingo-sub-1459966%22%20slang%3D%22en-US%22%3ESharePoint%20Hybrid%20Search%20Remote%20SharePoint%20Provider%20Query%20Timeout%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1459966%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20have%20configured%20outbound%20hybrid%20federated%20search%20and%20we%20have%20a%20remote%20sharepoint%20provider%20configured%20to%20be%20used%20in%20a%20result%20block.%20We%20seem%20to%20be%20hitting%20a%20timeout%20and%20I%20would%20like%20to%20know%20if%20it%20is%20possible%20to%20change%20the%20timeout%20value%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20error%20in%20the%20ULS%20logs%20is%3A%20%22QueryRouterEvaluator%3A%20Received%20results%20for%20already%20timed%20out%20query%20with%20query%20type%20ResultBlock%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20anybody%20know%20if%20this%20timeout%20is%20configurable%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20seems%20to%20be%20less%20than%203%20seconds%20which%20can%20be%20a%20bit%20short%20for%20a%20remote%20query.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1459966%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EHybrid%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1524986%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Hybrid%20Search%20Remote%20SharePoint%20Provider%20Query%20Timeout%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1524986%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F640294%22%20target%3D%22_blank%22%3E%40Rob_DF%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20configuration%20change%20from%20Microsoft%20Support%20is%20what%20I%20was%20looking%20for%20and%20it%20fixed%20the%20issue%20in%20our%20case.%20From%20Microsoft%20Support%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20do%20frequently%20see%20timeout%20issues%20with%20customers%20using%20a%20%22federated%22%20hybird%20query%20search%20experience.%26nbsp%3B%20Which%20is%20to%20say%20they%20are%20trying%20to%20seperately%20query%20both%20local%20on-premises%20SharePoint%20indexes%20and%20SPO%20online%20indexes%20to%20show%20them%20together%20on%20the%20same%20results%20page.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EWhat%20happens%20is%20that%20the%20defined%20query%20execution%20timeout%20(15%20seconds%20by%20default)%20isn't%20being%20applied%20the%20same%20across%20the%20actual%20primary%20query%20that%20is%20being%20executed%20and%20returned%20in%20the%20search%20results%20web%20part%20and%20any%20queries%20which%20are%20being%20triggered%20by%20query%20rules%20and%20displayed%20in%20best%20bets%20or%20results%20blocks.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EWhat%20we%20discovered%20is%20that%20there%20is%20actually%20a%20seperate%20property%20on%20the%20search%20service%20application%20object%20which%20tracks%20the%20timeouts%20for%20some%20of%20the%20different%20query%20subflows.%26nbsp%3B%20And%20that%20timeout%20can%20actually%20impact%20timeouts%20seen%20for%20the%20queries%20being%20triggered%20by%20the%20query%20rules.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3ESo%20what%20I%20would%20like%20you%20to%20do%20is%20try%20and%20increase%20the%20setting%20on%20the%20search%20service%20application%20to%20see%20if%20that%20allows%20the%20queries%20to%20be%20returned%20without%20a%20timeout.%26nbsp%3B%20The%20setting%20is%20'MinimumPartialQueryTimeout'%20which%20is%20only%20set%20to%201.2%20seconds%20by%20default.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EThe%20setting%20needs%20to%20be%20changed%20via%20SharePoint%20PowerShell.%26nbsp%3B%20In%20the%20following%20example%20I%20return%20the%20default%20value%20in%20milliseconds.%26nbsp%3B%20And%20then%20I%20update%20the%20setting%20to%205%20seconds(again%20in%20milliseconds)%3A%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EPS%20C%3A%5CUsers%5CSPFarm%26gt%3B%20%24ssa%20%3DGet-SPEnterpriseSearchServiceApplication%20%22Search%20Service%20Application%22%3CBR%20%2F%3EPS%20C%3A%5CUsers%5CSPFarm%26gt%3B%20%24ssa.MinimumPartialQueryTimeout%3CBR%20%2F%3E1200%3CBR%20%2F%3EPS%20C%3A%5CUsers%5CSPFarm%26gt%3B%20%24ssa.MinimumPartialQueryTimeout%20%3D%205000%3CBR%20%2F%3EPS%20C%3A%5CUsers%5CSPFarm%26gt%3B%20%24ssa.Update()%3CBR%20%2F%3EPS%20C%3A%5CUsers%5CSPFarm%26gt%3B%20%24ssa.MinimumPartialQueryTimeout%3CBR%20%2F%3E5000%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EAfter%20updating%20this%20setting%20you%20need%20to%20stop%20and%20restart%20the%20hostcontroller%20service%20on%20the%20SharePoint%20servers%20running%20the%20query%20components.%26nbsp%3B%20So%20they%20can%20reread%20the%20updated%20configuration%20setting.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

We have configured outbound hybrid federated search and we have a remote sharepoint provider configured to be used in a result block. We seem to be hitting a timeout and I would like to know if it is possible to change the timeout value?

 

The error in the ULS logs is: "QueryRouterEvaluator: Received results for already timed out query with query type ResultBlock"

 

Does anybody know if this timeout is configurable?

 

It seems to be less than 3 seconds which can be a bit short for a remote query.

1 Reply

@Rob_DF 

This configuration change from Microsoft Support is what I was looking for and it fixed the issue in our case. From Microsoft Support:

 

We do frequently see timeout issues with customers using a "federated" hybird query search experience.  Which is to say they are trying to seperately query both local on-premises SharePoint indexes and SPO online indexes to show them together on the same results page.
 
What happens is that the defined query execution timeout (15 seconds by default) isn't being applied the same across the actual primary query that is being executed and returned in the search results web part and any queries which are being triggered by query rules and displayed in best bets or results blocks.
 
What we discovered is that there is actually a seperate property on the search service application object which tracks the timeouts for some of the different query subflows.  And that timeout can actually impact timeouts seen for the queries being triggered by the query rules.
 
So what I would like you to do is try and increase the setting on the search service application to see if that allows the queries to be returned without a timeout.  The setting is 'MinimumPartialQueryTimeout' which is only set to 1.2 seconds by default.
 
The setting needs to be changed via SharePoint PowerShell.  In the following example I return the default value in milliseconds.  And then I update the setting to 5 seconds(again in milliseconds):
 
PS C:\Users\SPFarm> $ssa =Get-SPEnterpriseSearchServiceApplication "Search Service Application"
PS C:\Users\SPFarm> $ssa.MinimumPartialQueryTimeout
1200
PS C:\Users\SPFarm> $ssa.MinimumPartialQueryTimeout = 5000
PS C:\Users\SPFarm> $ssa.Update()
PS C:\Users\SPFarm> $ssa.MinimumPartialQueryTimeout
5000
 
After updating this setting you need to stop and restart the hostcontroller service on the SharePoint servers running the query components.  So they can reread the updated configuration setting.