[Premium] When scaling functions calls are accepted before vnet access is established
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 215
- Avg merge
- 4h 2m
- Merged PRs (30d)
- 1
Description
**Describe the bug**
It seems that when a premium functions app that is vnet joined scales up it starts accepting HTTP calls from clients before the vnet connectivity is established causing an error like this to appear in Application Insights:
```
Exception while executing function: GetBulk Cannot open server '' requested by the login.
Client with IP address '' is not allowed to access the
server.
```
**To Reproduce**
Steps to reproduce the behavior:
Allocate a premium functions app with 1 minimum instance.
Join it to a vnet with sql service endpoints enabled and a server available via a service endpoint with a vnet rule in it's firewall
Create an http C# function that access said sql server
Run a load that will cause the app service plan to scale above 1 instance
Watch the errors happen
**Expected behavior**
App service instances should not start accepting calls until vnet connectivity is established
I have a support plan if this is easier to work through a ticket. Just let me know.
** Screenshots **

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.