0

I am calling a Azure function from logic app , it triggers fine when it is deployed in azure,but it does go dormant after few hours ,I need to deploy it again the function to make it work again.I am using Maven to deploy the java function into azure function. Am I missing any settings here?

I have to deploy the function after few hrs to make it work again.It returns status code 400 and logic app fails..I have to deploy it to make work again.

Error we could see is File not found in C:/local/temp

Dev
  • 1
  • 1

1 Answers1

0

Logic app calling azure function goes dormant after few hours

This happens if the function app is inactive for a long time or deleted and also if any of the files being deleted from the temporary storage.

Check if the below steps helps to fix your issue:

  • Check if your deployed function got deleted in the function app.

  • If your function is frequently getting deleted after deploying to the function app, add a setting SCM_DO_BUILD_DURING_DEPLOYMENT= true in function app-> configuration-> Application Settings as shown below:

enter image description here

  • If you have a Function App running in a Basic/Standard/Premium App Service Plan, You can try to enable the "Always On" setting in the function app-> configuration-> General Settings to keep the function app running and prevent it from going inactive.

enter image description here

  • If the function App is using a Consumption Plan, the functions will be active whenever they needed to run, So there is no need of Always ON.

I also noticed that if we miss to pass the required parameters, getting the same error.

enter image description here

After passing the parameters, got expected results:

enter image description here enter image description here


I tried to reproduce the same in my environment by creating a Java Azure function and deployed to Azure function App.

enter image description here

Calling Azure function from Logic Apps:

enter image description here

Initially, it worked fine:

enter image description here

As for testing, I kept my function app idle for some time and checked:

I got 400 Bad Request error:

enter image description here enter image description here

Followed above provided troubleshooting steps to resolve this issue. I could call the Azure function and got expected results:

enter image description here

Pravallika KV
  • 2,415
  • 2
  • 2
  • 7