Azure APIM Response code 0 - Client connection was unexpectedly closed

Banuka 90 Reputation points
2024-08-16T04:05:51.9+00:00

We have a Azure Logic app that uses APIM connector to call a Azure API management endpoint which forward the request to a backend. Both logic app and APIM is in a Azure Vnet under two subnets.

On Azure API management log I have noticed some requests failed with Response code 0 with below error.

User's image

Connection timeout in logic app is the default value which is 2 mins. Can someone help me to identify the reason behind this time out.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,460 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,557 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JananiRamesh-MSFT 29,276 Reputation points
    2024-08-16T16:47:51.85+00:00

    @Banuka Thanks for reaching out. The term ‘Client Connection Failure’ essentially means that the client application (which initiated the API call) terminated the connection with the APIM service even before the backend API could revert with the expected response for the incoming API call and APIM could forward the same back to the client.

    It basically implies that the client abandoned the request before the response could be received. APIM has no control over when or why the client decides to abandon the request.

    These failures generally occur when the request is taking too long to complete so the client either gives up (a user may close the browser) or the client application may have a time out.

    Possible reasons could be Low time-out value in client application/Increased request processing time/The Backend API takes abnormally long to respond (possibly due to large payload) you need to make your backend to respond faster in this scenario.

    do let me know incase of further queries, I would be happy to assist you.

    https://techcommunity.microsoft.com/t5/azure-paas-blog/troubleshooting-4xx-and-5xx-errors-with-azure-apim-services/ba-p/2115744


Your answer

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