Azure App Service getting HTTP error 502 and 503 everytime RRS feed

  • Question

  • I'm deploying a .net framework 4.7.2 publishing through visual studio 2019.
    The publish is working well, I can see the files there but when I try to access the webpage I'm getting a 503 http response and 502 http response.

    I have a SQL Server database running on azure that my application connect to and another database for the SQLProviderMembership.

    I'm not getting any errors on the application insight.

    Using Kudo I could found a logtrace.xml and the only "error" I found is "Increasing the MaxRequestBodySize conflicts with the max value for IIS limit maxAllowedContentLength. HTTP requests that have a content length greater than maxAllowedContentLength will still be rejected by IIS. You can disable the limit by either removing or setting the maxAllowedContentLength value to a higher limit."

    Can someone give me a light how to solve it?

    I Already tried these steps:

    Thursday, May 28, 2020 1:30 PM

All replies

  • Hi Guilherme,

    Did you configure you application for logging tracing? That way, when you run

    az webapp log tail --name <app name>

    , you'll get trace data of what your app is actually doing up to the point of the error.

    Off the top of my head, since you're app is connecting to a SQL Server, a 503 could occur if there's an exception with connecting and performing a query against the database and there's an exception. The complaint about MaxRequestBodySize could be the result of pull too much data from a SQL query that results in a dataset larger than what's set. 

    I would enable some trace logging that writes out the SQL query and that would point the direction towards what query it might be. It would be something as simple as

    Trace.WriteLine($"Executing query {query}...");

    Let me know if this provides some sort of direction.

    Thanks in advance, Ryan

    Friday, May 29, 2020 8:01 PM
  • I'll try it thanks!
    Wednesday, June 3, 2020 8:48 AM
  • I'll try it thanks!

    Let me know if that helps solve the issue or ran into more blockers. Furthermore, MSDN will be sunset as we're migrating to Microsoft Q&A as our new forums. If you're not able to respond here, please create a new post over on https://docs.microsoft.com/answers/topics/azure-webapps.html and feel free to tag me, @ryanchill, directly.

    To Learn more about new platform, see Microsoft Q&A Getting Started.

    Thanks in advance, Ryan

    Thursday, June 4, 2020 6:28 PM