1
votes

I am setting up a web app on Azure for which I am using an azure app service. At the moment, the app service scales down to 1 instance at night, and scales up again in the morning.

When a request is sent to the app service when there are 2 instances, the response depends on the instance which handles the request. I would expect a 200, but half of the time I get a 500 http response.

I figured out it depends on the instance because when I use a cookie ARRAffinity (which lets you choose the specific instance of the app service), I am able to reproduce always 200 reponses on 1 machine, and always 500 responses on the other machine.

WEBSITE_LOCALCACHE_ENABLED is false and hence the app service should use the same code, coming from 1 network share if I am not mistaken.

Because half of the time, the app acts normal, I think this is not a code problem, but an infrastructural problem on Azure.

The web app is written in .NET and uses .NET Core 2.2. OS Version is windows and 64 bit system.

1
My guess would be that it is a code problem, but with something that has to do with for instance state or access rules for a specific resource. Can you provide a minimal reproducible example?rickvdbosch

1 Answers

0
votes

It might be the problem with instance or it might be the problem with code. When you seen the issue try to do the Advanced restart from the portal and see if that helps.

Also during the time of the issue see Diagnose and solve problems Blade of the App service and see under Availability and Performance section for the logs information which will give better idea.