Hello @Abitha Srini We are sorry to hear you're facing this issue. when did you start noticing this issue?
The “Bad Gateway” error (502) you’re encountering in your Azure WebApp for Containers could mean that there’s a problem with the network communication between the gateway (or proxy) and the servers
Here are a few potential causes and solutions:
- Network Security Group, User Defined Route, or Custom DNS issue: If access to the backend is blocked because of an NSG, UDR, or custom DNS, application gateway instances can’t reach the backend pool. This issue causes probe failures, resulting in 502 errors. You can validate NSG, UDR, and DNS configuration by checking NSGs associated with the application gateway subnet, UDR associated with the application gateway subnet, and presence of custom DNS in the VNet
- Application Level Issues: This problem is often caused by application level issues, such as requests taking a long time, application using high memory/CPU, application crashing due to an exception
- Exceeding the Maximum TCP Connections: There’s a chance you’re exceeding the maximum TCP connections for the plan
To troubleshoot these errors, you can use the diagnostics tool provided by App Service, which provides an intelligent and interactive experience to help you troubleshoot your app with no configuration required. You can also use the Kudu Debug Console for debugging, exploring, uploading files, as well as JSON endpoints for getting information about your environment
Hope that helps.