Exam AZ-204 All QuestionsBrowse all questions from this exam
Question 368

You need to correct the RequestUserApproval Function app error.

What should you do?

    Correct Answer: D

    To correct the RequestUserApproval Function app error related to timeout, the functionTimeout property of the host.json project file should be updated to 15 minutes. This addresses the timeout error directly by extending the execution time allowed for the function to run. The maximum timeout for HTTP-triggered Azure Functions on a consumption plan is 230 seconds, but functionTimeout settings in host.json can help overcome this limitation for apps running on higher tiers. Durable functions are useful for orchestrating long-running operations, but if the primary issue is a simple timeout, adjusting the functionTimeout property is the most straightforward solution.

Discussion
rdemontis

Answer is correct. In addition you can see this pattern in microosoft documentation and it's known as Human Interaction. https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp#human

surprise0011

received 2023-04-17 went with given answer, score 926

nflappo89Option: C

http trigger timeout is maxed to 230 seconds, so the only available option is to change to a durable one

maukaba

"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." REF: https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale

EltoothOption: C

C is correct answer. Durable Function.

MrXBasit

Answer is 100% correct

farichOption: D

I think here the answer is just to increase the functionTimeout. Durable Functions are used when you want to introduce a state, it is not just "if you have a long running function switch to Durable Functions". Another argument against Durable Functions is that architectural change seem to be out of scope for this case study. Another argument is that function can run for up to 30 mins.

maukaba

Maximum timeout you can set is 10 min in consumption plan. Unless you go to premium which is unlimited: https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale

xRiot007

"if you have a long running function switch to Durable Functions" - actually, that is one of the features of DF. Modifying the function app timeout will do nothing. There is a hard limit of 230 seconds of timeout. Anything larger than that, use DF, state or no state.

oskx2Option: D

How did it get this error message: 'Timeout value of 00:10:00 exceeded by function: RequestUserApproval'? If the max timeout for HTTP trigger is 230 seconds...

OPT_001122Option: C

Durable Function.

1CY1Option: C

A: Wrong : excluding async keyword results in a compile time error, not runtime. B: Wrong : enabling always on would relate to timeout not bad request. D: Wrong : functionTimeout property would relate to timeout not bad request. C: Correct : Durable function.