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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
KSKG
New Member

Schedule refresh failed.

Hi 
The report refreshing well in Power BI Desktop But it's getting failed by showing the below error.
Cannot execute <ReadChunkWithRetries>b__0 after 5 tries. The exception was raised by the IDbCommand interface.
Thanks in advance.

1 ACCEPTED SOLUTION
v-hashadapu
Community Support
Community Support

Hi @KSKG , Thank you for reaching out to the Microsoft Community Forum.

 

This error happens because Power BI Service runs your refresh differently than Power BI Desktop. On Desktop, you’re connecting directly with your machine’s drivers, but in the Service, the refresh depends on either the cloud connector or the On-premises data gateway. This error message usually points to the Service struggling to read large chunks of data, either because of a gateway misconfiguration, invalid credentials or a query that pulls back too much data and times out when run in the Service. That’s why it works locally but fails when scheduled online.

 

To fix it, first make sure your dataset is mapped to the correct gateway in the Power BI Service and that credentials are valid under Dataset settings -> Data source credentials. If the gateway is fine, then look at query performance, apply filters in Power Query, enable query folding or reduce the size of data pulled back so the Service isn’t timing out. If you’re connecting to SQL, also check the command timeout in Power Query and increase it if needed.

 

Configure scheduled refresh - Power BI | Microsoft Learn

Install an on-premises data gateway | Microsoft Learn

 

View solution in original post

6 REPLIES 6
Poojara_D12
Super User
Super User

Hi @KSKG 

That error usually occurs because the query can run successfully in Power BI Desktop, which uses your local machine’s resources and connection, but fails in the Power BI Service, where refreshes depend on the cloud environment or an on-premises data gateway. The message indicates that Power BI tried to read data in multiple chunks but failed after several retries, which often happens when queries are too large or heavy for the service limits, the database times out due to resource constraints, or the gateway/network connection drops during execution. In other cases, outdated drivers or data type mismatches can also trigger it. To resolve this, you can check gateway logs, update the gateway to the latest version, reduce query complexity by filtering or staging data at the source, consider incremental refresh for large tables, or review the database’s capacity settings (such as DTUs or concurrency in Azure SQL). Essentially, the error is a sign that the Service environment cannot process the query as smoothly as Desktop, so optimizing the query or ensuring sufficient source capacity usually fixes it.

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
v-hashadapu
Community Support
Community Support

Hi @KSKG , Hope you're doing fine. Can you confirm if the problem is solved or still persists? Sharing your details will help others in the community.

v-hashadapu
Community Support
Community Support

Hi @KSKG , Hope you're doing okay! May we know if it worked for you, or are you still experiencing difficulties? Let us know — your feedback can really help others in the same situation.

v-hashadapu
Community Support
Community Support

Hi @KSKG , hope you are doing great. May we know if your issue is solved or if you are still experiencing difficulties. Please share the details as it will help the community, especially others with similar issues.

nileshkfold
New Member

I am getting same error since last two days. Did you find the cause and solution for this?

v-hashadapu
Community Support
Community Support

Hi @KSKG , Thank you for reaching out to the Microsoft Community Forum.

 

This error happens because Power BI Service runs your refresh differently than Power BI Desktop. On Desktop, you’re connecting directly with your machine’s drivers, but in the Service, the refresh depends on either the cloud connector or the On-premises data gateway. This error message usually points to the Service struggling to read large chunks of data, either because of a gateway misconfiguration, invalid credentials or a query that pulls back too much data and times out when run in the Service. That’s why it works locally but fails when scheduled online.

 

To fix it, first make sure your dataset is mapped to the correct gateway in the Power BI Service and that credentials are valid under Dataset settings -> Data source credentials. If the gateway is fine, then look at query performance, apply filters in Power Query, enable query folding or reduce the size of data pulled back so the Service isn’t timing out. If you’re connecting to SQL, also check the command timeout in Power Query and increase it if needed.

 

Configure scheduled refresh - Power BI | Microsoft Learn

Install an on-premises data gateway | Microsoft Learn

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.