"Backend call failure" error in Nextjs App deployed on Azure static web app

146 Views Asked by At

Backend call failure

Recently we started facing Backend call failure issue on the Nextjs app. (Failed to load resouce: the server responded with a status of 500)

We have tried enabling App insights but not able to find anything in the logs.

In Availability and Performance section we are able to see Number of backend errors stating Failed invocation of backends and functions but not able to find source of these issues. (ref below image)

One more thing, recently we had also created another deployment of the same app pointing to the staging branch (Intent is to have two different env), timing was almost similar when we started seeing this issue. But even after deleting the newly created deployment (Azure static web app resouce) the issue persists.

FYI:

  1. The app is deployed on Azure Static Web App resource, currently we are using Free tier of azure.
  2. We have only one static functions written in the pages/api folder of the nextjs app, other api call are direclty made from app to the backend (Hosted in azure).
  3. The app keeps loading for 45 secs before throwning this error on the frontend.
  4. App is working fine in local.
  5. For deployment we are using github actions to build the app and deploy it on azure.

enter image description here

0

There are 0 best solutions below