1

My azure functions can take 30-40 minutes to complete.

As you can see in the below image, 230 seconds is the maximum amount of time that an HTTP triggered function.

So, i am trying to create an azure service bus triggered function. Wanted to know about its timeout, any help would be appreciated.

Thanks in advance.

Rahul
  • 1,858
  • 1
  • 12
  • 33
  • There is lock duration that con be configured: https://learn.microsoft.com/en-us/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock. Azure function internally renew the lock so you shouldnt have to worry. – Thomas Sep 04 '22 at 20:07

1 Answers1

1

Azure functions running on a consumption plan have a default timeout of 5 minutes, which can be extended to a max of 10 minutes. When using a premium or dedicated plan the default is 30 minutes but the max in unlimited, see the docs. So even your service bus triggered function has a max running time depending on the plan used.

Do mind that for http triggered functions the max runtime is 5 minutes:

Regardless of the function app timeout setting, 230 seconds is the maximum amount of time that an HTTP triggered function can take to respond to a request. This is because of the default idle timeout of Azure Load Balancer. For longer processing times, consider using the Durable Functions async pattern or defer the actual work and return an immediate response.

Peter Bons
  • 26,826
  • 4
  • 50
  • 74
  • `230 seconds is the maximum amount of time that an HTTP triggered function can take to respond to a request` can you please see this on the link given by you – Rahul Sep 05 '22 at 06:15
  • Does this mean, azure function can run for max 230 sec, regardless of the plan being used – Rahul Sep 05 '22 at 06:15
  • *azure function can run for max 230 sec, regardless of the plan being used* yes, if it is http triggered – Peter Bons Sep 05 '22 at 06:20
  • What if the function is being triggered from the service bus instead of HTTP, can we increase function running time in that case? What are the function types where we can increase the timeout than HTTP triggered? – Rahul Sep 05 '22 at 07:10
  • All, except http. But to a maximum of 10 minutes when running on a consumption plan. What plan are you using? – Peter Bons Sep 05 '22 at 07:15
  • Currently, i am using a consumption plan, but I can switch to others easily. I will check if the Service bus triggered can increase the timeout. Thanks for your help:) – Rahul Sep 05 '22 at 07:38