Share via

HTTP Response Timeout in Azure Logic Apps when called through Azure API Management (ActionResponseTimedOut / 504)

Hitakshi Chauhan 0 Reputation points
2026-03-16T10:49:37.07+00:00

Hi everyone,

I am facing a timeout issue in a workflow built using Azure Logic Apps that is being exposed through Azure API Management (APIM).

Architecture

Our integration flow is designed as follows:

  1. The Logic App uses the “When an HTTP request is received” trigger.

The HTTP trigger URL of the Logic App is configured as the backend in Azure API Management.

We expose the APIM frontend URL to the client application.

The client sends the request to APIM → APIM forwards it to the Logic App → Logic App processes the request and returns a Response action.

Flow structure:

Client

Issue

The workflow fails with the following error:

ActionResponseTimedOut

Observed Behavior

The request fails after ~1 minute.

The client receives 504 Gateway Timeout.

The failure happens before the Response action completes.

Timeout Understanding

From my understanding:

Logic App Response action timeout: ~230 seconds

Azure API Management backend timeout: ~240 seconds

However, in our case the request is timing out after approximately 60 seconds, which is much earlier than these limits.

Questions

I would appreciate guidance on the following:

Why would the request timeout at ~60 seconds when the Logic App and APIM limits appear higher?

Is there any hidden or intermediate timeout between APIM and Logic Apps that could cause this?

Are there recommended patterns when exposing Logic Apps through APIM where processing might take longer than a minute?

Would it be better to return an early response (202 Accepted) and process the workflow asynchronously?

Any insights or best practices from others who have implemented Logic Apps behind APIM would be very helpful.

Thank you,

HItakshi Chauhan

@Azure Learning Azure Learning @azure azure @azure azure @Azure,LogicApps
@logicapp @LogicApps @LogicApps Learner @CRM LogicApps @LogicApps, SVC_Europe @LogicApps

Azure Logic Apps
Azure Logic Apps

An Azure service that automates the access and use of data across clouds without writing code.


2 answers

Sort by: Most helpful
  1. Hitakshi Chauhan (IND) 0 Reputation points
    2026-03-24T05:42:07.49+00:00

    Hi Rakesh Mishra,

    Thank you for your response. We tried the suggested solution, but unfortunately, it did not resolve the issue. We are still experiencing the same problem. Could you please assist us further?

    Thanks,

    Hitakshi Chauhan

    0 comments No comments

  2. Rakesh Mishra 7,065 Reputation points Microsoft External Staff Moderator
    2026-03-16T11:12:14.85+00:00

    Hello Hitakshi,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    The behavior you are experiencing is quite common when integrating long-running Logic Apps with API Management (APIM). While it might seem like APIM or the Logic App is cutting the connection short, the 60-second limit usually originates elsewhere in the request chain.

    According to official Microsoft documentation, here is why this may be happening and how to resolve it:

    1. Why does the request timeout at ~60 seconds?

    The maximum limits for Logic Apps (up to 230 seconds) and the default APIM <forward-request> policy (300 seconds) are much higher than 1 minute. If your request drops at exactly 60 seconds, it is typically caused by one of the following:

    • Client Timeout: Most HTTP clients (like Postman, browsers, or code libraries like HttpClient) have a default request timeout of 60 to 100 seconds. When the client times out, it drops the connection, causing APIM to sever the backend call.
    • Upstream Gateways: If you have an Azure Application Gateway, Azure Front Door, or a Web Application Firewall (WAF) in front of APIM, they often enforce strict default timeouts (e.g., Azure Front Door's default is exactly 60 seconds).
    • The send-request Policy: If you happen to be using the <send-request> policy instead of the standard <forward-request> policy in APIM, it is important to note that <send-request> defaults to exactly 60 seconds.

    2. Recommended patterns for long-running workflows behind APIM

    Holding an HTTP connection open for more than a minute is an anti-pattern for synchronous API calls, as underlying Azure network infrastructure (such as the Azure Load Balancer) will actively drop idle TCP connections after 4 minutes (240 seconds).

    The officially recommended approach for long-running workflows is the Asynchronous Polling Pattern:

    • Enable Asynchronous Response: In your Logic App designer, go to the settings of your Response action and turn on Asynchronous Response. The Logic App will immediately return an HTTP 202 Accepted status with a location header.
    • Client Polling: The client application reads the location header from the 202 response and periodically issues GET requests to that URL until it receives a final HTTP 200 OK.

    3. Adjusting Timeouts (If Async is not an option) If you must process synchronously and are certain the timeout is happening within an APIM policy, you can explicitly define the timeout in your XML. Note: Do not set this above 240 seconds, as the Azure Load Balancer may drop the idle connection regardless.

    • For standard routing: <forward-request timeout="240" />
    • For custom requests: <send-request mode="new" timeout="240">

    Official Documentation References:

    Note: The above response is drafted with the help of AI systems.

    0 comments No comments

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.