Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Rob92
Frequent Visitor

Set Semantic Model Refresh Timeout Limit

I have a semantic model I've scheduled to refresh every 1.5 hours.  Every couple of days it will get stuck refreshing and keep trying until it is automatically stopped by the Premium 5 hour refresh timeout limit.  This means that subsequent refreshes are blocked because the previous one is stuck.  Is there any way to reduce that timeout limit and tell it to cancel any refreshes that take longer than say 1 hour?

 

Rob92_1-1725616437826.png

 

 

3 ACCEPTED SOLUTIONS
Jonvoge
Super User
Super User

Hi Rob92

 

I don't believe such an option exists.

However, you could create your own leightweight monitoring and timeout setup, by leveraging the Power BI APIs.

The following API allows you to get the status of your refreshes: Datasets - Get Refresh History - REST API (Power BI Power BI REST APIs) | Microsoft Learn

The following API allows you to cancel an active refresh: Datasets - Cancel Refresh - REST API (Power BI Power BI REST APIs) | Microsoft Learn



_____________________________________________________
I hope my comment was helpful.
If your question was answered, please mark your post as 'Solved' and consider giving me a 'Thumbs Up'.
Find me on LinkedIn, Sessionize, or my blog Downhill Data

View solution in original post

v-jtian-msft
Community Support
Community Support

Hello,Jonvoge .

thanks for your concern about this issue.

Your answer is excellent!
Hi,@Rob92 .I am glad to help you.
In fact, Jonvoge has already made a good suggestion: utilize the Power BI API to set up a refresh supervision to deal with refresh timeout situations in a timely manner.
Here are some additional suggestions I hope you find helpful:
1.Try to start with power BI reports, such as optimizing report models
Complex relationships and inefficient queries will slow down the refresh speed, you see also try to check and optimize your query logic and data model. Reduce some unnecessary operations.
URL:
Optimization guide for Power BI - Power BI | Microsoft Learn

2. If your report supports incremental refreshes (the Data source supports query collapses and there are Data/Time type fields in the data set for partitioning processing), you can configure incremental refreshes to reduce the amount of data that needs to be processed with each refresh.
5. Use XMLA endpoints (for Premium workspaces, Premium Per User)
XMLA endpoints allow you to implement semantic models that manage your reports in different ways
In this way, data can be customized, monitored, and managed. In this way, the refreshing is not affected by the maximum daily refreshing times (scheduled refreshing times and scheduled refreshing timeout) of the license, and works with RestAPI to improve the refreshing efficiency.
URL:
Advanced incremental refresh and real-time data with the XMLA endpoint in Power BI - Power BI | Micr...
The Evolution of XMLA Endpoint in Power BI: A Comprehensive Guide (insightsarena.com)
Announcing refresh history updates for models utilizing XMLA endpoints | Microsoft Power BI Blog | M...
Power BI XMLA Endpoint - Step by Step Examples, How to Use? (excelmojo.com)

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

Best Regards,

Carson Jian,

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

cpwebb
Microsoft Employee
Microsoft Employee

First of all, there are a couple of different timeouts that are relevant to refreshes. I wrote a series of blog posts on refresh timeouts here:

https://blog.crossjoin.co.uk/2021/12/05/troubleshooting-power-bi-timeouts-part-1-the-two-five-hour-i...

https://blog.crossjoin.co.uk/2021/12/12/troubleshooting-power-bi-timeouts-part-2-timeouts-specified-...

https://blog.crossjoin.co.uk/2021/12/16/troubleshooting-power-bi-timeouts-part-3-the-external-comman...

The easiest option is probably (depending on the data source you're using) to set a timeout inside Power Query (as discussed in the second post) for the largest/slowest tables. You can set timeouts on refresh operations if kick them off using XMLA commands but that's quite hard to do.

 

If you use the Enhanced Refresh API you can control the number of retries. Probably the easiest way to use the Enhanced Refresh API to run refreshes is to use Semantic Link and the refresh_dataset method, something I show how to do in this blog post https://blog.crossjoin.co.uk/2024/05/12/the-partialbatch-commit-mode-in-the-power-bi-enhanced-refres...

 

 

View solution in original post

3 REPLIES 3
cpwebb
Microsoft Employee
Microsoft Employee

First of all, there are a couple of different timeouts that are relevant to refreshes. I wrote a series of blog posts on refresh timeouts here:

https://blog.crossjoin.co.uk/2021/12/05/troubleshooting-power-bi-timeouts-part-1-the-two-five-hour-i...

https://blog.crossjoin.co.uk/2021/12/12/troubleshooting-power-bi-timeouts-part-2-timeouts-specified-...

https://blog.crossjoin.co.uk/2021/12/16/troubleshooting-power-bi-timeouts-part-3-the-external-comman...

The easiest option is probably (depending on the data source you're using) to set a timeout inside Power Query (as discussed in the second post) for the largest/slowest tables. You can set timeouts on refresh operations if kick them off using XMLA commands but that's quite hard to do.

 

If you use the Enhanced Refresh API you can control the number of retries. Probably the easiest way to use the Enhanced Refresh API to run refreshes is to use Semantic Link and the refresh_dataset method, something I show how to do in this blog post https://blog.crossjoin.co.uk/2024/05/12/the-partialbatch-commit-mode-in-the-power-bi-enhanced-refres...

 

 

v-jtian-msft
Community Support
Community Support

Hello,Jonvoge .

thanks for your concern about this issue.

Your answer is excellent!
Hi,@Rob92 .I am glad to help you.
In fact, Jonvoge has already made a good suggestion: utilize the Power BI API to set up a refresh supervision to deal with refresh timeout situations in a timely manner.
Here are some additional suggestions I hope you find helpful:
1.Try to start with power BI reports, such as optimizing report models
Complex relationships and inefficient queries will slow down the refresh speed, you see also try to check and optimize your query logic and data model. Reduce some unnecessary operations.
URL:
Optimization guide for Power BI - Power BI | Microsoft Learn

2. If your report supports incremental refreshes (the Data source supports query collapses and there are Data/Time type fields in the data set for partitioning processing), you can configure incremental refreshes to reduce the amount of data that needs to be processed with each refresh.
5. Use XMLA endpoints (for Premium workspaces, Premium Per User)
XMLA endpoints allow you to implement semantic models that manage your reports in different ways
In this way, data can be customized, monitored, and managed. In this way, the refreshing is not affected by the maximum daily refreshing times (scheduled refreshing times and scheduled refreshing timeout) of the license, and works with RestAPI to improve the refreshing efficiency.
URL:
Advanced incremental refresh and real-time data with the XMLA endpoint in Power BI - Power BI | Micr...
The Evolution of XMLA Endpoint in Power BI: A Comprehensive Guide (insightsarena.com)
Announcing refresh history updates for models utilizing XMLA endpoints | Microsoft Power BI Blog | M...
Power BI XMLA Endpoint - Step by Step Examples, How to Use? (excelmojo.com)

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

Best Regards,

Carson Jian,

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Jonvoge
Super User
Super User

Hi Rob92

 

I don't believe such an option exists.

However, you could create your own leightweight monitoring and timeout setup, by leveraging the Power BI APIs.

The following API allows you to get the status of your refreshes: Datasets - Get Refresh History - REST API (Power BI Power BI REST APIs) | Microsoft Learn

The following API allows you to cancel an active refresh: Datasets - Cancel Refresh - REST API (Power BI Power BI REST APIs) | Microsoft Learn



_____________________________________________________
I hope my comment was helpful.
If your question was answered, please mark your post as 'Solved' and consider giving me a 'Thumbs Up'.
Find me on LinkedIn, Sessionize, or my blog Downhill Data

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.