Forum Discussion

Ibrahim001's avatar
Ibrahim001
Frequent Visitor
1 year ago
Solved

Power BI Gateway - Timeout Error When Connecting to SQL Data Source

Hi all,

I am experiencing an issue with a Power BI dataset that is configured to connect to a SQL Server data source via the On-premises Data Gateway. The dataset fails to refresh, and the following error message is returned:

 

Error Message:

"Unable to create connection for the following reason: Unable to connect to the data source. Either the data source is inaccessible, a connection timeout occurred, or the data source credentials are invalid. Please verify the data source configuration and contact a data source administrator to troubleshoot this issue."

Background:

  • I can connect to the same SQL Server data source using Power BI Desktop with the same credentials.
  • The issue occurs only when using the Power BI Service via the Gateway.
  • The gateway is installed and online, and I have configured the data source under the Manage Gateways section in Power BI Service.
  • The connection is using SQL authentication.

Please let me know if you require any other information for investigation.

 

  • ibarrau's avatar
    ibarrau
    1 year ago

    If changing the timeouts from your query hasn't changed anything and still send the timeout in the same amount of seconds, then go to the DB team. There might be something on the SQL Server side for timeout the connections or queries.

    Regards

6 Replies

  • Hi. By default a connection dataflow is very short period, it's like 10 seconds before timeout. You can increase that value in the Power Query code. If you check the docs for sql databases:

    https://learn.microsoft.com/en-us/powerquery-m/sql-database

    You can see a ConnectionTimeout parameter that you can use to increase that time and make sure it connects.

    Don't go for 30 minutes here because if it fails it could take a lot of time. You can increase by 30 seconds o 1 minute. The parameter takes a #duration value.

    I hope that helps,

     

    • Ibrahim001's avatar
      Ibrahim001
      Frequent Visitor

      Hi, thank you for the response. The above did not work. It looks like a firewall, proxy, or routing rules are blocking this connection hence I have reached out to the network team.

      • ibarrau's avatar
        ibarrau
        Super User

        If changing the timeouts from your query hasn't changed anything and still send the timeout in the same amount of seconds, then go to the DB team. There might be something on the SQL Server side for timeout the connections or queries.

        Regards

  • v-kathullac's avatar
    v-kathullac
    Community Support

    Hi Ibrahim001   ,

    we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
    If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

     

    Regards,

    Chaithanya.

  • v-kathullac's avatar
    v-kathullac
    Community Support

    Hi @Ibrahim001   ,

    we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
    If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

     

    Regards,

    Chaithanya.

  • v-kathullac's avatar
    v-kathullac
    Community Support

    Hi @Ibrahim001   ,

    we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
    If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

     

    Regards,

    Chaithanya.