I am new in azure function I have created a azure function app and added 2 time tigger functions from azure stack and deployed my code from vs 2019 using publish profile my function worked for some time then suddenly removed from azure function app my azure function app is still available but function removed from azure function I did not do any deployment in between.some one please help me in below points 1-do we need to choose any specific storge type because it is time tigger function. 2-my function is deleting after some time last time deployed 10th jan and function removed 10th feb. Please help me thanks in advance
1 Answers
Created and running the 2 Timer Trigger Functions (at these intervals 0/10 * * * * *
, 0/15 * * * * *
) successfully in Azure Functions of .NET Stack 6 (Locally - Visual Studio):
When you create a Function App in Azure Portal, the following 3 resources are created in your resource group:
One more resource called Application Insights will come when you enable it during creation or after creation but for now, I disabled it.
The above 3 resources are the main for any Function App in Azure Portal.
Functions are automatically removed after deploying to the Azure Cloud:
Scenario 1:
When you deployed the Function App from the Visual Studio to the Azure Cloud, it will shown this statement under the Functions menu in the Portal Function App:
Now the functions will run even they're in read-only mode. But if you make a change in WEBSITE_RUN_FROM_PACKAGE
app setting under Configuration, then the functions will be deleted automatically:
Now the configuration loos like:
If you make that setting value to 0 or delete that setting from configuration after deploying, then the functions will be deleted automatically as you can the screenshot below:
To make your functions read-write from the Azure portal, you need to remove the run from package
setting before publishing to Azure Function in the Cloud, which means uncheck the Run from Package
file setting in the publish window:
If you have to re-publish/redeploy the function from Visual Studio to the Cloud and to uncheck that app setting, create new publish profile and deploy by unchecking that app setting as you can see below:
Here is the Function App Configuration looks and the different message under Functions Menu with the published Function Files:
Reference: How to disable read-only mode in Azure Function App
Scenario 2:
There is no specific type of storage account required except the one that comes with function app creation to store any functions and its data until you require any specifically like Azure Data Lake Gen 2 Storage account, etc.
If you remove the storage account, then the functions from the Function App in the portal are removed automatically.
If you removed the storage account, go ahead to recover the account.
Scenario 3:
Check your AzureWebJobsStorage
value under Azure Function App Configuration menu is the same as the associated storage account connection string.
Scenario 4:
If you're using your company cloud subscription, please check the policies with the owner/user administrator for that subscription. For example, the policies would be like delete the resources from these resource groups after a certain period like 3 days, 1 day, 1 week, 1 month, etc.
-
Thanks hari, I have checked all above setting I have one more doubt function got deleted from azure function app and trying to recreate again but function are not creating for me so is this azure portal side issue or code side please help me in this issue. – Vikalp Chandel Feb 22 '22 at 05:54
-
Sure @VikalpChandel, provide the error code details what you're getting while creating the function or the function code that you're deploying and the steps of how you're deploying/creating the function? – Feb 22 '22 at 05:57
-
@VikalpChandel, Any Update to the issue? – Feb 23 '22 at 11:39