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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
mr_wizard
Resolver I
Resolver I

how to resolve query timeout problem

I have a semantic model that is experiencing a query timeout.  I need help to make it not experience the timeout.

 

The model is in Import mode.  When it runs a refresh in the service, it throws the following error after a certain amount of time:

Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

 

That error is consistently thrown at about 40 minutes, no matter what time the refresh is ran at.  This surprises me, as the Query Timeout setting for semantic models in the service is at its default value (3600 seconds = 60 minutes) (i.e., the error is being raised before the Query Timeout setting value).  To be sure, the model connects to a SQL Server source (actually, an Azure SQL Managed Instance source), and no value is provided in the [Command timeout in minutes] setting in the pbix file that creates the model.  If the timeout were due to load balancing, I would expect varying timeouts (e.g., one at 40 minutes, one at 60 minutes, etc.).

 

I have tried increasing the Query Timeout setting in the service to 2 hours (7200 seconds), but that did not resolve the problem.  How can I resolve this problem?

 

If it matters, the model is in a workspace that is in a Premium capacity, and the model supports inception-to-date reporting (i.e., it cannot have scope set by date).  The model type is a dimensional model with one fact table that has about 30M rows.  Rows in the fact table can change.  So, the model cannot use an incremental refresh strategy.

1 ACCEPTED SOLUTION
rohit1991
Super User
Super User

Hi @mr_wizard ,

You're encountering a query timeout issue during the refresh of an import-mode semantic model in Power BI, despite having increased the query timeout setting in the service to two hours. Given that the error consistently occurs around the 40-minute mark, it's unlikely the issue stems from the Power BI service's query timeout configuration. Instead, the problem may lie with the data source or the underlying infrastructure—particularly the Azure SQL Managed Instance you're connecting to.

 

Even if Power BI allows longer execution times, SQL Server itself may have internal limits or resource governance policies (such as workload group timeouts, resource pool limits, or session timeouts) that terminate long-running queries. Additionally, gateway timeout settings or network-level interruptions could also be involved. Since your model uses a large fact table with 30M rows and cannot leverage incremental refresh due to data volatility, you might explore breaking the refresh into smaller partitions using XMLA endpoints or optimizing the query itself through indexing, query tuning, or reducing unnecessary columns and rows. It’s also worth reviewing SQL Server execution plans for bottlenecks and working with your DBA to ensure no throttling or session limits are being imposed. If feasible, consider whether hybrid strategies, such as staging data into intermediary tables or snapshots, can help mitigate the performance overhead during refresh.

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

View solution in original post

4 REPLIES 4
Shubham_rai955
Advocate V
Advocate V

Hi @mr_wizard , I wrote some trobleshoot steps please try and let me know.

  • Increase the Command Timeout in Power BI Desktop under Options -> Data Load to a higher value.

  • Check and update the SQL Managed Instance timeout settings to ensure they are not set to 40 minutes.

  • Update the Power BI data gateway and verify network stability between the server and Power BI.

  • Optimize SQL queries by indexing, filtering data at the source, and using staging tables or materialized view

v-ssriganesh
Community Support
Community Support

Hi @mr_wizard,

Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to @rohit1991 & @Shubham_rai955 for sharing valuable insights.

 

Could you please confirm if your query has been resolved by the provided solution? If so, please mark it as the solution. This will help other community members solve similar problems faster.

Thank you.

rohit1991
Super User
Super User

Hi @mr_wizard ,

You're encountering a query timeout issue during the refresh of an import-mode semantic model in Power BI, despite having increased the query timeout setting in the service to two hours. Given that the error consistently occurs around the 40-minute mark, it's unlikely the issue stems from the Power BI service's query timeout configuration. Instead, the problem may lie with the data source or the underlying infrastructure—particularly the Azure SQL Managed Instance you're connecting to.

 

Even if Power BI allows longer execution times, SQL Server itself may have internal limits or resource governance policies (such as workload group timeouts, resource pool limits, or session timeouts) that terminate long-running queries. Additionally, gateway timeout settings or network-level interruptions could also be involved. Since your model uses a large fact table with 30M rows and cannot leverage incremental refresh due to data volatility, you might explore breaking the refresh into smaller partitions using XMLA endpoints or optimizing the query itself through indexing, query tuning, or reducing unnecessary columns and rows. It’s also worth reviewing SQL Server execution plans for bottlenecks and working with your DBA to ensure no throttling or session limits are being imposed. If feasible, consider whether hybrid strategies, such as staging data into intermediary tables or snapshots, can help mitigate the performance overhead during refresh.

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
Shubham_rai955
Advocate V
Advocate V

Hi @mr_wizard , I wrote some trobleshoot steps please try and let me know.

  • Increase the Command Timeout in Power BI Desktop under Options -> Data Load to a higher value.

  • Check and update the SQL Managed Instance timeout settings to ensure they are not set to 40 minutes.

  • Update the Power BI data gateway and verify network stability between the server and Power BI.

  • Optimize SQL queries by indexing, filtering data at the source, and using staging tables or materialized view

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors