Azure Function response times out, and tcp connection is reset (closed) before all content is received

Martin Jørgensen 36 Reputation points
2019-12-12T20:21:45.87+00:00

Hi.

I am not sure, if this is the right forum.

We have an embedded device, which connects to an Azure Function and gets a 10MB file.
During the file transfer the connection is reset (TCP RST) or we see, that Azure is no longer sending data to the device, even though the device is capable of receiving data. It normally happens after minutes 5-10 minutes.

Using WireShark we are able to see, that even though the device sends "TCP Window Update", where "Win" size is more than the size of 1 TCP package, no new data is received. As a consequence, the embedded device times out waiting for data (set to 30 seconds i the test), and the embedded device sends an "ACK" and "FIN".

If the same device fetches the file from a Linux server, it works.

We know of "idle timeouts" of Azure Load Balancer, and "FunctionTimeout" if an Azure Function. But what are we missing?

The Azure Function is running on a WebApp plan, with always on enabled.

Best regards
Martin

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,323 questions
Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
405 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 22,521 Reputation points Microsoft Employee
    2019-12-25T19:25:48.823+00:00

    @Martin Jørgensen , Welcome to Microsoft Q&A! Thanks for the question.

    Ack! Azure Function service is yet to be migrated to Q&A. Please post your question directly on the MSDN forum/continue your discussion there for the service (Azure Function forum)

    We are actively working to onboard all services. We will make a public announcement once complete.
    Checkout 'Microsoft Q&A Getting Started' to learn about the new platform.

    Thank you for your patience as we evolve the Q&A platform.

    Having mentioned above & as Jeremey suggested try to narrow-down the issue via Postman and review the code for the timeout configuration. I understand you have already tried, enabling Always on and FunctionTimeout option, durable Function orchestrations are implemented in code and can use the programming language's built-in error-handling features to isolate the issue further. You might want to abandon a function call within an orchestrator function if it's taking too long to complete. Typically, the proper way to do this today is by creating a durable timer ( using context.CreateTimer (.NET) or context.df.createTimer (JavaScript) in conjunction with Task.WhenAny (.NET) or context.df.Task.any (JavaScript).

    For longer processing times, consider using the Durable Functions async pattern or defer the actual work and return an immediate response.

    0 comments No comments