GRPC HTTP 502 error all the time now

Kjetil Kristoffer Solberg 1 Reputation point
2024-07-07T13:41:21.95+00:00

I'm getting HTTP 502 error. Sometimes it works a bit, then it fails again.

I'm using .NET 8.0.

It works locally just fine.

This has happened before, and sometimes it works for a couple of days, then fails again.

Please help.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,429 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Kjetil Kristoffer Solberg 1 Reputation point
    2024-07-08T09:51:05.5433333+00:00

    Hi, thank you for answering.

    I am using GRPC on a Linux machine.

    I am using Azure App Service not Container.

    I wonder if the problem has anything to do with Azure updating the machine every Sunday. I don't know if they do that. I think the last time it did not work was a Sunday as well. I'm checking every day but it works again now.

    I have 2 instances but both fails when this happens.

    The code works perfectly locally and when it works in Azure. I don't believe there is any code issues it is an HTTP 502 error.

    My webpage (a different app service) never goes down, or I have not observed it. So it is strange.

    0 comments No comments

  2. ajkuma 24,971 Reputation points Microsoft Employee
    2024-07-09T07:50:04.9633333+00:00

    Thanks for the follow-up and update. I completely understand about the inconvenience with this issue.

     

    To dig deeper into the issue, we need to fetch more details about the issue, review Azure App Service (ASP) logs. The logs can provide valuable information about the error, including the stack trace and any relevant error messages. You may also check the Azure App Service metrics to see if there are any spikes in CPU or memory usage that could be causing the issue.

    I understand, as you mentioned that the issue might be occurring periodically, possibly on Sundays.
    Kindly let us know, I'll follow-up with you further privately to fetch more details about your Azure resources.

     

    Here are a few steps you can take to troubleshoot and potentially resolve the issue:

    1.    Review Application Logs: Check the application logs around the time the error occurs to see if there are any patterns or specific errors that can provide more insight.

    2.    Check Azure Service Health/Resource Health: Just to provide some pointers

    Azure  Service Health provides you with a customizable dashboard which tracks the health of your Azure services in the regions where you use them.

    Azure Resource Health helps you diagnose and get support for service problems that affect your Azure resources. It reports on the current and past health of your resources.

    3.    Scale Up/Down: As a temporary workaround, you may scale up or down your ASP and then scaling back to your original plan. This allocates new instances and a new internal load balancer to your app service, which might resolve the issue if it's related to the underlying hardware. 

     

    4.    Custom Error Pages: If you have custom error pages configured, ensure they are set up correctly and test them to see if they are returned as expected during downtimes. 

     

    --If you haven't done, enable and review logs to fetch more details about the error: #enable-application-logging-linuxcontainer
    --Checkout the log directory/location information -here - Access log files


    If the answer helped (pointed you in the right direction) > please click Accept Answer Or please share the requested/more info to help you better.

    0 comments No comments