0

The functionTimeout parameter in my host.json file is set to "functionTimeout": "00:45:00"

I'm seeing timeouts happen every 45 minute interval.

When I dig into the timeouts through Application Insights, they have not been running for 45 minutes. Here's an example:

Start: enter image description here

End:

enter image description here

I have also done what I can to make sure my function isn't running in parallel. I've limited the function to run on 1 machine and one instance using "batchSize": 1 in my host.json file.

How is it possible that I'm seeing timeouts before the maximum allotted time for the function to run before a timeout? And how come I'm seeing timeouts happen every 45 minute interval, which aligns with what my functionTimeout parameter is set to?

host.json details:

{
  "version": "2.0",
  "logging": {
    "applicationInsights": {
      "samplingSettings": {
        "isEnabled": true,
        "excludedTypes": "Request"
      }
    }
  },
  "extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle",
    "version": "[2.*, 3.0.0)"
  },
  "extensions": {
    "queues": {
      "batchSize": 1
    }
  },
  "functionTimeout": "00:45:00"
}
BlakeB9
  • 345
  • 1
  • 3
  • 13

1 Answers1

0

There is a limit to the maximum amount of timeout which can be allotted in a function.

This limit is determined by the you subscription plan and it varies accordingly.

for e.g., the maximum timeout in consumption plan is 10 min.

Please check your subscription plan and edit accordingly.

Refer the following article by Chris Peitschmann for Indepth explanation on azure function timeouts.

Mohit Ganorkar
  • 1,917
  • 2
  • 6
  • 11
  • Thanks for the reply, yes I'm aware of that fact, my problem is that my function app is timing out every 45 minutes no matter how long an invocation has been running. For example, say my function app runs a new file, and let's say that takes 30 seconds, after it's done running the file and starts the next invocation on the next file, shouldn't that ```functionTimeout``` counter reset? It seems that mine is not resetting and consistently timing out at 45 minutes, while no invocation is actually taking that long. – BlakeB9 May 09 '22 at 14:05
  • Function time out is basically the maximum execution time of the function. It will not reset after every computation. It will run for 45 min as stated in the host.json file. – Mohit Ganorkar May 09 '22 at 15:27
  • Well, just a little update, I'm not seeing the timeouts happen anymore, as of today. I've had my function running for a few hours today with no timeouts at the 45 minute mark. So I'm a little confused, because if what you said is true, then I'd still expect to see those timeouts. – BlakeB9 May 09 '22 at 18:28