4

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.

freedev
  • 25,946
  • 8
  • 108
  • 125
Jay
  • 133
  • 2
  • 13
  • Wow, 190 sounds a lot for just 3k items. What's the typical time to process one item? – Mikhail Shilkov Jul 11 '18 at 07:25
  • @Mikhail Avg time to process one item is 955.1 ms. – Jay Jul 11 '18 at 07:30
  • Just to double check, when you are referring to instances, you are referring to the number of Cloud Role instances you are seeing in App Insights, not the number of concurrent executions you see? – Connor McMahon Jul 12 '18 at 13:41
  • @ConnorMcMahon Yes, I'm referring to the Cloud Role instances I have seen in my application insights. – Jay Jul 13 '18 at 05:42

2 Answers2

2

For consumption plans, Azure Portal now has dedicated slider for Scale Out: enter image description here

0

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.

Tom Sun - MSFT
  • 24,161
  • 3
  • 30
  • 47
  • For the same number of requests(9.3k calls)other apps able to control the instances, is there any other specific reasons for unable to scale out instances of apps? – Jay Jul 11 '18 at 10:24
  • Sorry, I don't know any other specific reasons. – Tom Sun - MSFT Jul 12 '18 at 08:35