Share via

Some tables and views timing out in Power Apps connecting to Azure SQL Server

AY 36 Reputation points
2026-04-21T15:58:01.91+00:00

Hi

Today we've been experiencing a timeout issues in a Power App which connects to Azure SQL Server. Below is the error message on one of the queries.

User's image

This connection has been setup for roughly 3 years without issues but today these errors.

Note that some other tables have not errored.

I've checked the performance of the Azure SQL Server and it is no where near capacity.

Any ideas?

Thanks in advance.

Azure SQL Database

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 133.9K Reputation points MVP Volunteer Moderator
    2026-04-21T20:51:24.6333333+00:00

    First, I have no experience of Azure Power Apps myself. It may be that Power Apps are submitting extra queries under the covers and these are the ones timing out. You can use the XEventProfiler in SSMS to determine if that could be the case.

    More, generally, the experience Slow in the Application, Fast in SSMS is not unheard of. There are several reasons why this can happen. One thing you can try when you get these timeouts in the Power Apps is to first run SET ARITHABORT OFF before you run the query in SSMS. It is also important to run the query exactly as it is submitted from Power Apps, including spacing and all. What you want is to find the same cache entry that the application uses. If you get a new cache entry, you may get a different plan from the existing one.

    For a lot longer discussion on this problem, I have an article on my web site with the title Slow in the Application, Fast in SSMS? where I discuss these problems in more details and possible solutions.


  2. Q&A Assist
    2026-04-21T15:58:42.9133333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The error indicates a SQL timeout: the query against specific tables/views isn’t completing within the allowed time, even though the database isn’t at overall capacity. Timeouts can be caused by:

    • Connectivity issues between Power Apps and Azure SQL (transient or network-related)
    • Long‑running or blocked queries on those particular tables/views
    • Resource limits being hit at database or server level (for example, worker threads, sessions, locks), even if CPU/DTU looks low

    Use the following steps to narrow down and mitigate the issue.

    1. Confirm it’s a connectivity/timeout issue
      • The message pattern matches Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. which is a standard SQL timeout.
      • Follow the guidance for timeout errors: increase the timeout and see if the operation eventually succeeds. If it does, treat it as a network/latency issue and investigate connectivity.
    2. Check and harden connectivity
      • From a client close to the Power Apps region (for example, a VM or workstation), test connectivity to the Azure SQL server on port 1433 using tools like Test-NetConnection as shown in the Power Apps + Azure SQL troubleshooting guidance.
      • If connection succeeds but is slow or intermittent, work with networking to address latency or packet loss.
      • Ensure firewall and networking settings on the Azure SQL server are correct (for example, “Allow Azure services and resources to access this server” enabled if appropriate, and correct client IPs allowed).
    3. Increase connection timeout and add retry logic in the calling layer
      • For applications connecting to Azure SQL, use at least a 30‑second connection timeout and implement retry logic for transient failures. This is recommended for cloud-connected apps and helps ride out short service or network blips.
    4. Investigate query behavior on the affected tables/views
      • Because only some tables/views are timing out, focus on those queries:
        • Check for blocking: long transactions or cascading operations on related tables can block reads/writes and cause timeouts.
        • Look for long‑running queries or complex views that may need optimization (indexes, query rewrite, batching).
      • If the issue is related to Dataverse plug‑ins or other upstream logic writing to these tables, review for blocking patterns, large cascades, or operations on newly created tables/columns where indexing is still stabilizing.
    5. Check for resource governance or transient service issues
      • Even when overall utilization looks fine, specific resource limits (worker threads, sessions, locks, database size) can be hit and cause errors or slowdowns. Review for errors such as 10929, 40544, 40549, or 40550 in SQL error logs or client logs.
      • Also check for transient fault errors (for example, 40197, 40501) around the timeouts. If present, ensure retry logic is in place and review Azure status and Resource Health for any transient platform issues.
    6. If the problem persists
      • Collect timestamps, error codes, and correlation IDs from the failing operations.
      • Enable diagnostic logging on the app and Azure SQL to capture detailed error and performance data.
      • If timeouts continue beyond transient periods or occur frequently, open an Azure support request with the collected data for deeper investigation.

    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.