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

Nirali Shah 146 Reputation points
2023-03-29T06:07:06.09+00:00

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,003 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,141 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Mike Urnun 9,811 Reputation points Microsoft Employee
    2023-04-06T02:32:46.5533333+00:00

    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.