503's from Azure Static Web App (Nuxt 3)

Adrian Campos 0 Reputation points
2025-02-21T14:48:52.64+00:00

Hello, I've been noticing daily 503's in my application insights logs. I have an azure function that pings my azure static web app every two minutes to keep the backend functions warm. This is a separate function app from the static web app's backend functions. I have a separate app insights instance on this function app and this is how I saw the 503's logged.

Every day I notice 503s for 10-20 minutes at random times. This morning I experienced it first hand, it was down for 20 minutes or so and then just randomly came back online.

I tried:

  • using the diagnose problems tab but it showed no errors whatsoever and was limited in what it could do to help
  • checking the app insights instance tied to the static web app but it had zero information even zero requests (perhaps it's not setup right, I did get a notification this morning that the log workspace needed to be repaired on that app insights instance)
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,087 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Siva Nair 410 Reputation points Microsoft Vendor
    2025-02-28T09:06:39.2733333+00:00

    Hi @Adrian Campos ,

    In addition to Silvia Wibowo response,

    Go to your Static Web App in the Azure Portal->Settings ->Configuration. Confirm that the APPINSIGHTS_INSTRUMENTATIONKEY or APPLICATIONINSIGHTS_CONNECTION_STRING is correctly set. Navigate to Monitoring ->Diagnostic Settings and ensure that logs are being sent to your Application Insights instance. Make sure to enable Request, Dependency, and Exception logs to get detailed telemetry. Application Insights primarily tracks backend requests, so ensure your API routes are correctly defined in your routes.json file. Confirm that the API is reachable by testing the endpoints directly.

    Additionally,

    If no data is visible in Application Insights, Check if the Static Web App is correctly connected to the API. Make sure the API is returning responses with appropriate status codes (e.g., 200 for success). Investigate the Live Metrics Stream to see if requests are reaching the backend. Ensure the Application Insights resource is not misconfigured due to the log workspace needing repair. Navigate to Application Insights ->Logs. If prompted, follow the repair steps to re-establish the connection.

    If you have any further assistant, do let me know.

    If the answer is helpful, please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.