Azure functions scaling error on Azure portal - azure

I get "getting Scale out issues detected Storage is not configured properly, Function scaling will be limited. Click to learn more." error in azure portal while in azure function apps.
It is on consumption model.
I followed the Microsoft guide-https://learn.microsoft.com/en-us/azure/azure-functions/functions-recover-storage-account#storage-account-was-deleted
and other answer here and added the missing values WEBSITE_CONTENTAZUREFILECONNECTIONSTRING and
WEBSITE_CONTENTSHARE(I only have AzureWebJobsStorage set right now).
When I then run my logic apps, all azure functions return 404 not found. I had to delete WEBSITE_CONTENTAZUREFILECONNECTIONSTRING and WEBSITE_CONTENTSHARE to make them work again.
My concern is how to fix this because we are also facing performance issues and I am not sure if this scaling issue is contributing to it?

AFAIK Below might be reasons for getting the error,
Region for storage account and function app are different.
Region for storage account and logic app are different.
App service plan is different for logic app and function app.
Check whether AzureWebJobsStorage and WEBSITE_CONTENTAZUREFILECONNECTIONSTRING values are same or not in standard logic app configuration.
Check the AzureWebJobsStorage in function app is matching with the value of AzureWebJobsStorage in standard logic app configuration.
Check below links that may helps you,
Reference link 1
Reference link 2

Related

Encountered a StorageException while trying to fetch the diagnostic events

Out of nowhere started seeing this error when opened function apps, Application is working though.
Unable to retrieve diagnostics and error information for your function app.
Encountered a StorageException while trying to fetch the diagnostic events.
Please make sure the connection string in the app setting "AzureWebJobsStorage" has the permissions to access Azure Table Storage
Storage account network access is set to "Enabled from selected virtual networks and IP addresses". Even with this settings there was no error before.
but now the above error message is gone only when changed to "Enabled from all networks".
Recently updated functionapp to dotnet 6.0 and v4 runtime even after, there was no error. Not sure if this has anything to do with this.
How do I fix for this?
This was caused by a platform level alert raised by a diagnostic component, and although it had no impact on the production workloads, the verbiage wasn't clear and the level misleading. The event has been disabled and you should no longer see this come up.
To expand, this error was reported by the control plane for the diagnostic component, which is meant to surface diagnostic events raised by production components to the portal, but not involved in any production workload flow and had no impact on the App's functionality.
We noticed the same issue in several of our functionapps. We also have configured the functionapp to be able to access the storage account via a subnet in a vnet, which worked fine until a few days ago. The functionapp itself is still working as intended, but it started showing this message a few days ago. As a test we did 'Enable from all networks' on the storage account, which resolved the warning message. I suspect there is some other service besides the functionapp which needs access to the storage account to read the functionapp diagnostic information. If I would know which service we could grant it access to the storage account without needing to 'Enable from all networks'
I raised a support ticket with Microsoft regarding this issue and was told that there seems to be a platform issue for App Services in West Europe region and they are currently investigating.

Strange error in V3 Function App in Azure Portal

I have a V3 function app deployed to Azure, and on the OVERVIEW page I get this odd error message - "System.Runtime.Extensions: Value cannot be null. (Parameter 's')."
The function appears to be running and processing inputs, but if I go into FUNCTIONS, then I see another error message "Azure Functions runtime is unreachable."
Clicking on the "Functions runtime error" link in the Notifications section at the bottom of the OVERVIEW page does nothing - it doesn't provide any details on the error, or WHERE the error is being thrown.
Any ideas?
There might be many causes that exist for this kind of errors Azure Functions runtime is unreachable:
As mentioned in the troubleshooting steps of the above error in Microsoft Documentation, the most common reason for this is that the function app has lost access to its storage account.
One of the workaround I did here:
Created the Azure Function (.Net 3.1 Stack) - Premium Plan in the Azure Portal with HTTP Trigger, It is running successfully.
Below are the resources associated with this function app.
As stated in the above documentation to get that kind of runtime unreachable error, I deleted the storage account associated with this Function App.
After that deletion of the associated storage account, it has given the same error "Azure Functions Runtime is unreachable"
Recovered the deleted storage account and run the function again:
Make sure your storage account is not deleted which is associated with that function app, otherwise the function won't work.
Check the Storage account connection string to whether it is deleted or overridden. For example AzureWebJobsStorage is the local storage emulator connection string variable set in local.settings.json used in running the function locally. The same variable has a different value in the Azure portal used to run the function in azure. So, make sure that all the properties related to the storage account are available and correct.
If you set the firewall in the storage account and are not configured to allow traffic to and from functions, please allow it.
If your daily usage quota is full, then the function runtime will not work. To resolve this, increase or remove the daily quota limit and restart your function app. Otherwise, the execution of your function app is blocked until the next day.
Please check your function app has allowed your IP address in inbound IP restrictions, which might be configured to block internet access.
If your function is hosted in Internally load-balanced App Service Environment, please check the internal IP address is allowed because you might be configured to block inbound internet traffic so that the function runtime is unreachable.
Make sure you set the correct value of FUNCTIONS_EXTENSION_VERSION in Configuration (Application Settings) in the Azure Portal Function App as that is the function runtime version setting and refresh the function app/re-deploy the function.
As I created the Function App of .Net Core 3.1 Stack so the compatible function runtime version is 3.

How to Scale up an Application Service from PremiumV2 to PremiumV3 when it's not available

We are planning to scale our Azure App Service to PremiumV3 to decrease our costs, however there is a limitation of Azure and so the documentation guides to create a new app service and then redeploy the application. But we really need to perform a complete migration for the following:
We have more than 170 domains pointed to this Application Service
We need to keep our public IP, otherwise we will lose the pointers from our customers.
We have tried:
Create new V3 plan, in the same region and in the same Resource Group but the console informs that this is not possible.
Cloning the app from the console, but nothing happens.
Does anyone have any suggestions on this situation?
Thanks

Deleting Azure App Service Plan

I am trying to delete app service plan from azure portal and understand the fact that it cant be deleted if an app sits in the service plan. Found an interesting thing here, even though there is no app or slots available in service plan it is not allowing me to delete app service plan. Following screen, any help or insights is appreciated-
I just had the same issue, this is how I deal with it.
The fact you see the number of apps/slots with the values 0/0, means you app has been well deleted. But your browser still keep in memory the old values, reason why it display a message saying one app is still in the Service Plan.
If you simply hit F5, the value will be updated and you'll be able to remove the App Service Plans.

How to do network tracing in Azure Function?

I am having a problem with a third-party library. It worked last week but this week is failing. I wish to turn on the network tracing as I would normally configure in web.config such as is described for an Azure App Services job here:
https://blogs.msdn.microsoft.com/waws/2017/03/14/how-to-get-a-system-net-trace-of-your-c-web-job/
Is this in any way possible with Azure Functions, or is there an alternative?
Unfortunately this isn't possible with consumption plan as we don't allow you to modify the web.config.
If you can set up an app service plan for testing, you can deploy the functions runtime as a private site extension with your web.config changes, see here: https://github.com/Azure/azure-webjobs-sdk-script/wiki#deployment
A related option to help you with diagnostics/analytics is the preview app insights support: https://github.com/Azure/Azure-Functions/wiki/App-Insights-Early-Preview

Resources