Share via

How to handle Client.Timeout exceeded while awaiting headers error in Http trigger Azure function

Nirali Shah 146 Reputation points
Mar 29, 2023, 6:07 AM

We are facing a timeout issue with HTTP trigger azure function. When we are sending 50, 100, 200 or more than 200 request at a time, we are receiving an error like this: webhook request #196 failed: Post "https://xxxsentkhzxwpghvzaru.azurewebsites.net/api/AnomalyEvent": context deadline exceeded (Client.Timeout exceeded while awaiting headers).

Though request is successfully processed on Sentinel side , we are receiving above error on client side.

By referring this and this we think that durable function app might be the solution of this issue.

So, to overcome this we have created a Durable function app following this link as it returns quick response on client side from starter function, but facing the same issue in that too.

Can you please let us know the solution to overcome this issue? As we have to handle 1000 request at a time simultaneously without throwing timeout error on client side.

Here, I have attached the screenshot of an error that we are receiving.

Error message

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,159 questions
Microsoft Sentinel
Microsoft Sentinel
A scalable, cloud-native solution for security information event management and security orchestration automated response. Previously known as Azure Sentinel.
1,173 questions
0 comments No comments
{count} votes

1 answer

Sort by: Newest
  1. Mike Urnun 9,821 Reputation points Microsoft Employee
    Apr 6, 2023, 2:32 AM

    Hello @Nirali Shah Sorry for the late reply. Were you able to troubleshoot this issue? Is it Sentinel that's attempting to establish a webhook handshake via post request to your HTTP-triggered function? I'd look at the Azure Sentinel side of the configuration more since I've never seen that error message in Functions, specifically around TimeOut-related issues. If you haven't already, you can try the waitForExternalEvent method in Durable Functions to wait for a response from the Sentinel side before sending a response to the client: Wait for events

    0 comments No comments

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.