Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Azure Function returns Timeout after 1 minute but code executes successfully
Post Flair (click to view more posts with a particular flair)
Post Body

I have an HTTP-Triggered Azure Function using Python 3.9 runtime that does some reading from key-vault and writing to a database. The whole process usually takes 40-70 seconds and in some cases even less. I invoke this function from .NET using an http request to the URL of the function and I need to wait for the result for further branching inside the .NET code. So this Azure Function returns me a Timeout error after slightly one minute, sometimes even says that the Service went down even though I can still see it up and running and I can execute more calls. The funniest part of this is that, I get an error that either service is down or timeout error but the code from the function executes and I can see it clearly from the logs that everything goes as it should go. I'm not sure whether this is something that I, as a developer should fix or the function as a service is just unstable and it makes these funny things. Another thing I'd like to note is that I haven't set any timeout value in host.json so I assume it uses the default one of 230 seconds.

I dig up the whole internet but couldn't find what could cause this so that's why I chose to ask here. TLDR of the whole thing would be, why does my app return a timeout error or a 503 (service down) error after one minute of running but the code inside the function executes so it tricks my client app (the one that triggers the function) in thinking that the request failed, even though it didn't? What should I make in order to fix this error?

Author
Account Strength
100%
Account Age
7 years
Verified Email
Yes
Verified Flair
No
Total Karma
11,701
Link Karma
3,445
Comment Karma
7,357
Profile updated: 1 day ago
Posts updated: 7 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
2 years ago