question

venkateswaranP-1646 avatar image
0 Votes"
venkateswaranP-1646 asked venkateswaranP-1646 commented

I want to run an azure python code 27/7 and very good execution speed

hello,

I want to run an azure python code 27*7 at a very good execution speed.

I have tried azure function HttpRequest but the code stops execution after sometime

return(func.HttpResponse( test.run() ))

What to do about it?

the function is creating time out after some time

 Timeout value of 00:30:00 exceeded by function 'Functions.HttpTrigger1' (Id: '53791e4e-919b-4f7c-b879-8ebec441a4e3'). Initiating cancellation.
azure-functions
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SamaraSoucy-MSFT avatar image
0 Votes"
SamaraSoucy-MSFT answered venkateswaranP-1646 commented

30 minutes is the default timeout on plans other than Consumption (consumption has 5 minute default/10 minute max). In order to go beyond that you need to change it by setting functionTimeout to -1 in your host.json file.

That being said, even with unbounded runtime, the function is only guaranteed to run for at least an hour, so you need to be able to restart the 24/7 process in case it stops for any reason. The durable functions framework has this capability- you can set a trigger on a timer or http or something similar and that trigger's job is to check if an orchestrator function is already running. If not, it starts a new instance of the singleton. You can read more on that in the durable functions docs: https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-singletons?tabs=python




· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@venkateswaranP-1646

Just check8ing in- does that sufficiently answer your question?

0 Votes 0 ·

I tried to deploy in durable functions framework but the code which I wanted did not run so now trying to create a Python 3.7 with Ubuntu 18.04 LTS and deploy the code

hope it will work .

when I tried to run it in the azure function it did run for some time then failed but was not running in durable functions.

0 Votes 0 ·