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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Data Refresh Error for Cosmos DB in Power BI Desktop

Hi all,

 

I have an issue while refreshing the power bi data on the power bi desktop, it's taking more than a week to refresh the data for other pbix files and now it's been more 4-5 days one pbix file data is still refreshing and at last every time it's throwing the error,

my data source is Cosmos Db I'm connecting through Azure Cosmos Db v1.

and my data source cosmos db table only has data around 42,000 rows.

 

following error:

 

error: DataSource.Error: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
Details: --cosmos db url ----

 

Kindly please advise for the above error, thanks in advance for your suggestions..

 

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

 

It seems you are experiencing a refresh issue in Power BI Desktop when connecting to Cosmos DB. The error you're encountering is: "DataSource.Error: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server."

One possible solution is to reduce the amount of data being imported, as this might help with the refresh issue.

 

Additionally, you can check if you are able to connect to the same server and database from Excel or SSMS. If you are not able to connect, then the issue is not isolated to Power BI and you should fix the connectivity issue at your end.

 

If you are able to connect, then you can try changing the server name/IP address and verifying if the database name is correct. You can also try using both Windows credentials and SQL Server user ID and password.

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.