vscode-azurefunctions
vscode-azurefunctions copied to clipboard
Azure function created with always on = off
- VS Code Version: latest
- Azure Account Extension Version:
- OS Version: win 10
Steps to Reproduce:
- Create an azure function via VS Code extension.
- Deploy.
- Login into Azure Portal and find the created function.
- Go to Configuration -> General Settings.
Result: Always on = off
Hi @ihorbond, thanks for filing an issue.
Please elaborate as to what problem you're running into and provide steps to reproduce it.
@wwlorey just added the steps. sorry was in a rush. maybe this bug is purely presentational but I noticed when you crate an Azure function via Azure Portal UI always on defaults to On vs function created via vscode ext it defaults to Off
Thanks for providing these details @ihorbond. Transferring this to the Azure Functions Extension repo to better address the issue.
More context on this:
From https://docs.microsoft.com/en-us/azure/app-service/configure-common?tabs=portal#configure-general-settings:
Always On: Keeps the app loaded even when there's no traffic. When Always On is not turned on (default), the app is unloaded after 20 minutes without any incoming requests. The unloaded app can cause high latency for new requests because of its warm-up time. When Always On is turned on, the front-end load balancer sends a GET request to the application root every five minutes. The continuous ping prevents the app from being unloaded. Always On is required for continuous WebJobs or for WebJobs that are triggered using a CRON expression.
Fyi @wwlorey I think this is only for app service plans (not consumption or premium) https://docs.microsoft.com/en-us/azure/azure-functions/dedicated-plan#always-on
@ihorbond can you confirm you chose a dedicated app service plan?
Yes, I did have an app service selected and it is HTTP triggered. so that means it should be off by default then and will wake on HTTP request and will take a some time to warm up correct ?