'Unable to scale out azure function instances using WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT setting
We are using azure function apps with consumption plan(integrated with service bus queues).
One of the app containing 4 functions and rest are having 1 to 2 functions.
We have set WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT setting for each app to control the instances.
Apps which contains 4 and 2 functions are having 190 instances to process 2.9k calls(WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT has been set to 100),
Even though this setting is preview feature it's working fine for some apps(3 to 9 instances to process 9.3k calls).
What I'm not able to understand is what may be the reason for having 190 instances? whether it is due to many functions in single app or it may due to any memory leak. Is there anyone faced the same problem with azure function apps before.
My application host.json settings are :
"serviceBus": {
"maxConcurrentCalls": 5,
"prefetchCount": 50,
"autoRenewTimeout": "00:05:00"
}
Thanks.
Solution 1:[1]
Solution 2:[2]
It maybe a known issue currently. For more information please refer to Azure function Host Configuration Settings.
Set a maximum number of instances that a function app can scale to. This limit is not yet fully supported - it does work to limit your scale out, but there are some cases where it might not be completely foolproof. We're working on improving this.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Peterson Salamat |
| Solution 2 | Tom Sun - MSFT |

