Forum Discussion

CampBI's avatar
CampBI
Icon for Helper I rankHelper I
1 year ago
Solved

Business Central data source error - An existing connection was forcibly closed by the remote host.

Hello Everyone, Asking for help, Is there anyone have an experience in resolving Power bi connected to MS Business Central Dynamics 365 having issues with the scheduled refresh/ on demand refresh and Desktop app refresh with  this Data source error: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. the exception was raised by the IDataReadwr interface.? Thank you, I was blocked by this issue..your advice and suggestions would definitely help…

 

Background: We are pulling data from MS Dynamics 365 Business Central using Webservices. 

17 Replies

    • CampBI's avatar
      CampBI
      Icon for Helper I rankHelper I

      thank you for this, I do'nt have any experience connecting API pages but I would reached out to support team regarding this suggestion

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi CampBI,
    Thank you for posting your query in Microsoft Fabric Community Forum. Also, thanks to  GilbertQ  , for those inputs on this thread. 

     Unable to read data from the transport connection An existing connection was forcibly closed by the remote host  usually happens when Power BI tries to connect to Business Central, but the connection breaks in between. Since you are using Web Services to pull data, there could be a few reasons:

    If you are pulling a large amount of data at once, the connection may time out. Try reducing the data or breaking it into smaller parts. Business Central may close the connection if the request takes too long or if too many requests come at once.

    Sometimes, a firewall or proxy between Power BI and Business Central may block the connection. You can check with your network/IT team for this. If you are refreshing in Power BI Service, make sure your on-premises data gateway is installed properly, updated, and has access to Business Central.

    It’s also possible that Business Central service was down or busy when the refresh happened. You can check the Microsoft 365 Service Health portal if you have access.

    Gothroygh with below document link hope it may resolve the issue :
    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/web-service-pbi-performance
    https://learn.microsoft.com/en-us/power-bi/connect-data/refresh-troubleshooting-refresh-scenarios
    Hope this helps if you have any queries we are  happy to assist you further.
    Regards,
    Harshitha.

    • CampBI's avatar
      CampBI
      Icon for Helper I rankHelper I

      is there any way to update the timed out up to 5 hours, currently the refresh schedules from power bi service and Desktop refresh was about 3 hours or more.. we tried to rebuild the dashboard but still getting errors...regarding on the on premises data gateway, where I could find this?

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi CampBI,
        Thanks for followup

        In Power BI Service, the refresh timeout depends on your workspace type.

        • If you are using a Pro workspace, the refresh will fail after around 2 hours.
        • To go beyond that, like up to 5 hours, you need to use Power BI Premium like P1 or Fabric capacity. That allows refreshes for up to 5 hours.

        In Power BI Desktop, there's no fixed timeout, but still, the connection can break if Business Central closes it from their side due to long processing.

        Now, regarding the on-premises data gateway If you are pulling any data from on-premise systems like SQL Server or files on your local server, then you need a gateway. But if you are using only Business Central online, usually gateway is not required.

        Anyway, you can check it like this:

        Open Power BI Service → click the ⚙ gear icon → Manage gateways

        Or you can download and install the gateway from this link:
        https://www.microsoft.com/en-us/power-platform/products/power-bi/gateway

        Once it's installed, just sign in and map your data sources. Since your refresh is taking more than 3 hours and still failing, I suggest trying to reduce the data load or split your queries if possible like filtering data by date or breaking large tables into parts.

        If you have any Issues, please feel free to post back.
        Thank you