Hi @Johan Tokarskij,
You can enable verbose logging in Application Insights by modifying your host.json
file like this:
{
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": false
},
"logLevel": {
"Function": "Trace",
"Host": "Information"
}
}
}
}
This will help track all interactions and might provide you with more detailed logs on whether specific requests, errors, or scaling events are related to the issue you're facing.
Regarding the scaling limit, I should clarify that the functionAppScaleLimit
setting doesn’t apply to the Consumption Flex plan. This feature only works with Premium or App Service plans, so you won’t be able to use it to limit the number of instances in the Consumption Flex plan. Since you're on the Consumption Flex plan, you won’t be able to restrict scaling directly with this setting.
Since Always On is also not available on the Consumption Flex plan, you can try a workaround by implementing a warm-up strategy. You can use an Azure Timer Trigger to send regular, small requests to your function every few minutes, keeping it warm and reducing the chances of it being recycled during idle times. A simple example would look like this:
def warm_up_trigger():
log.info(f"Function warmed up at {datetime.datetime.now()}")
I hope you find this information useful!
If this answer was helpful, please click Accept and leave a thumbs up by clicking Yes/Like.
If you require assistance with a technical support issue, please post a new thread so we can assist you on providing a resolution.If you have any further questions, please click Comment .