Azure web app giving 502 errors intermittently

Rajat Kumar Jha 20 Reputation points
2023-01-12T07:05:06.57+00:00

I have developed a web app by using .net mvc framework to upload videos directly into blob storage. I have deployed this on my azure web app which previously had plan B1 where I used to get 502 issues. So I looked into "Diagnose and solve problems" section and find out that memory consumption was high and I was getting "OutOfMemoryException" .

1

3

4

So, I increased the plan to P1V2 , and set to Autoscale and try testing with 1 user and then 3 users

5

But I am still getting 502 issues intermittently and cpu consumption is 100 %.

6

7

Can anyone help me how to solve it?

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,425 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,223 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,853 questions
{count} votes

Accepted answer
  1. VenkateshDodda-MSFT 18,081 Reputation points Microsoft Employee
    2023-01-13T07:01:53.0766667+00:00

    @Rajat Kumar Jha Thank you for reaching out to Microsoft Q&A, apologize for any inconvenience caused on this.

    Based on the shared information, We have looked at the platform logs for your webapp the 502 error that you are seeing in Diagnose and solve problem is from frontend instance (means bad gateway) which is expected since worker throwing 500 error OutOfMemoryException due to the application code.

    We would request you to review your application code and check if there were any memory leakages in it.

    Since there are memory leakages, increasing the app service plan to higher tier will only help temporarily but eventually it will hit the memory limit. So permanent fix is to review your application code and fix the memory leakage.

    Feel free to reach back to me if you have any further questions on this.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful