Context: You have a website running on Azure App Service that has a Azure Application Gateway in front.
Problem: Your clients receive the dreaded ERR_CONNECTION_CLOSED error randomly.
Troubleshooting: If you look at the Application Gateway logs, you will notice that the HttpStatus is 0. It is not a standard HTTP status code. You will also notice that SentBytes is also 0.
In such cases, the App Gateway does not forward the traffic to your backend target.
Cause: The predominant cause of such issues is that your application exceeded a certain Application Gateway limits as described in https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits#azure-application-gateway-limits . For example, you may have cookie data that exceeds the 16 KB limit for HTTP/2. You can check your cookie sizes in Developer tools as shown below.
Unfortunately, as of August 2025, the only way to know what limit you exceeded is by opening at ticket with Microsoft Support.
Solution: Modify your application code or adjust the appropriate configuration values, if applicable.
blog@aileronconsulting.com






