SharePoint Hybrid Search Remote SharePoint Provider Query Timeout

Copper 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.