Forum Discussion
Business Central SaaS Odata connection
Hi TomaszTub ,
The error "Connection was closed by remote host" can occur when dealing with importing large amounts of data from online sources. This error can also occur when using the OData connector in Power BI desktop, and it might be due to throttling from the data source end.One possible solution is to reduce the amount of data being imported. If you're already tried reducing the data and the problem persists, it might be due to the data source not being able to provide the data within the default timeout of the OData connector, which is 10 minutes.You can try increasing the timeout value in your M code. For example, you can set the timeout value to 30 minutes like this:
OData.Feed("https://services.odata.org/V3/Northwind/Northwind.svc", null, [Timeout=#duration(0,0,30,0)])
OData.Feed - PowerQuery M | Microsoft Learn
If the problem still persists after increasing the timeout, it might be necessary to work with the owner of the data source to ensure it doesn't take too long to provide the data or to further reduce the amount of data being imported.
If you have enabled query caching in your dataset, you might want to turn it off if you always want to see the latest data.
Please try these suggestions and see if they help resolve the issue.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group