0

I am new to Azure development and developed a function app

I published my function app to Azure portal. It is working fine on my development machine but on portal it's throwing following exception (some times)
The operation 'ScanLogs' with id '2eggec6de-54f5-4t34-5423-afffce5c6a43' did not complete in '00:02:00'.

I couldn't find solution to this error. Can somebody help me to understand what this error is about and why we get this?
following is timeout specified in host.json in prod.
enter image description here

shary.sharath
  • 649
  • 2
  • 14
  • 29
  • In short: the operation 'ScanLogs' is taking too much time. Is it waiting for resources? What's the code? Did you add logging? Please provide a [mcve]. – rickvdbosch Jan 28 '20 at 12:55
  • this is a BlobTriggerred function app, we move files to storage account. I have no logs, but enables Application Insights for this purpose. – shary.sharath Jan 28 '20 at 13:23

1 Answers1

0

Depending on the version of function you are running check here for the exact syntax in host.json - https://learn.microsoft.com/en-us/azure/azure-functions/functions-host-json-v1

The default timeout for a function on the consumption plan is 2 minutes, if you need it to run longer then change/add the functiontimeout value, i.e.

"functionTimeout": "00:05:00",

in host.json.

NB: On a Consumption plan this can't be more than 10 minutes so if you need it to run longer either find a way to break up your function into smaller chunks and maybe use a Durable function fan=out fan-in pattern or change it to run on a dedicated App Service Plan where it can run for as long as you like but obviously you'll have to pay to have the server running 24/7

Simon
  • 1,613
  • 1
  • 12
  • 27
  • I am using Elastic Plan for my function app and in my host.json I have specified functionTimeout to be 3 hours. { "version": "2.0", "functionTimeout": "03:00:00" } Today when I checked my application insight I have exception message: The operation 'ScanContainer' with id '00959070-cfc4-4b5e-9529-49408f52226f' did not complete in '00:02:00'. – shary.sharath Jan 29 '20 at 08:08
  • If you got that message then it definitely timed out, have you ensured that the change to 3 hours has been deployed correctly check the Function app settings link in the portal for your function as that will show you the current host,json deployed – Simon Jan 29 '20 at 15:50
  • It's confirmed in function app host.json it is 3 hours. I updated question with attachment. – shary.sharath Jan 31 '20 at 11:49