UPDATE: 4/25/17: PowerShell to increase timeout included in workaround section.
Scenario:
You create a PowerPivot workbook with one or more data sources and upload it to SharePoint 2016. You then schedule the workbook to refresh and the refresh fails with the following error: “The operation has timed out“.
Cause:
This issue is caused by a change to the design of the product in SharePoint 2016 that limits a single PowerPivot data source to a refresh duration of 100 seconds (or 1:40). Note that this can also be caused by slow or underperforming data sources if you think your data should be refreshing in under 100 seconds. If you are pulling a small amount or data from a complex data source that takes a long time to query, you may consider alternative workarounds as increasing the timeout may not be the best option.
Symptoms:
- If you expand the refresh history, you will notice that the data source of which refresh failed on ran for exactly 1:40 (100 seconds).
- You may notice that some of your data sources actually succeed, or that the refresh succeeds intermittently if all of the data sources refresh in less than 100 seconds.
- In the SharePoint ULS logs, you will see the actual error reported, but it will not seem to correlate to anything meaningful as far as a cause (because it doesn’t….)
00/00/2017 14:49:18.44 w3wp.exe (0x00000) 0x59D4 PowerPivot Service Data Refresh 99 High EXCEPTION: System.Net.WebException: The operation has timed out at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request) <<truncated stack>>
- You will likely see a correlating event in the Application Event logs (EventID: 5214).
- If you have multiple workbooks pulling from the same source, and one workbook is slowing the data source down causing the other queries to wait or slow (past the 100s), you may see multiple workbooks fail that do not normally fail.
Potential Workarounds:
- Optimize your queries to run faster.
- Query less data.
- Add hardware to your data source to process queries faster.
- Use PowerShell to increase the default timeout setting.
- From a SharePoint 2016 Administrator enabled PowerShell prompt:
$farm = Get-SPFarm #The timeout value is in milliseconds, so be very careful to not set it too low!!! $farm.Properties.Add("WopiProxyRequestTimeout", <new timeout value>); $farm.Update(); #to double check the setting $farm.properties
- To set this to a different value in the future:
$farm = Get-SPFarm $farm.Properties.WopiProxyRequestTimeout = <new timeout value> $farm.update()
Disclaimer: Increase this timeout value at your own risk! We realize that the new default timeout is very low, but you should also be aware of the amount of data that you are pulling vs the time it should take to pull that data. Setting this timeout too high and allowing users to pull large amounts of data can cause performance issues for PowerPivot, SharePoint and Office Online Server. You will also be limited by the default timeouts for SharePoint, SQL and your external data sources. This timeout value may not always be the answer. There are more workarounds and optimization options depending on the type of data you are pulling.
- From a SharePoint 2016 Administrator enabled PowerShell prompt:
NOTE: This blog applies SPECIFICALLY to the issue listed above and ONLY to PowerPivot for SharePoint 2016 Scheduled Data Refresh. This may not be the only context that you see this error and you could also run into it in other versions of the product (but it will not be for the same reason!!).