Intermittent OriginError from Front Door CDN misses

Russell Paine 0 Reputation points
2023-11-09T17:53:19.3833333+00:00

We are having issues with Azure Front Doors CDN on one of our routes. The route is pointing towards a App service that's running a node with a Next.JS v13 application. The caching of SSR pages works fine most of the time but periodically the CDN misses before the "s-maxage" is up and the page 400s with no content on the page request. The "s-maxage" is set to 86400, but the cache misses start well before then.

Looking into the access logs for Front door, we can see that the request is being sent to the correct endpoint, the routing rule name is the same as the endpoint. And an error info of: "OriginError". Following the same request to the web app HTTP logs we can see that it has been requested fine and is passing back a 200 code. No issues from Next.JS. What is weird is that when the page is refreshed the CDN misses again but the page loads fine, but then if the page is refreshed again it errors. It does this continually in a loop; until the CDN hits again and returns fine from then on until the issue starts again. Another thing to note is the "routingRuleName" in the Front door access logs are different for when the cache miss happens it goes from the specific route name to the name of the endpoint. But the request still manages to end up going to the web app.

OriginError is marked as "Generic origin error" which isn't helpful to go off as what we can see from the App service is a 200 error and a success message.

Can someone help us figure out what is going wrong?

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
671 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,679 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Russell Paine 0 Reputation points
    2023-12-06T09:44:45.56+00:00

    After waiting over two weeks! For a response from the Microsoft support team; the issues was simply that our "Last-Modified" was not in the correct format. We were providing a format like: Wed Dec 06 2023 09:39:07 GMT+0000 (Greenwich Mean Time). When it should've been Wed, 06 Dec 2023 09:39:13 GMT.

    Unfortunately; due to the slow response time from the support team we had to move on from using the Front Door cache to other solutions for our CDN. Hopefully this saves some one else the anguish of waiting for a response.

    If only Front Door reported meaningful error messages, we could've solve this ourselves!

    No idea how it took them so long to diagnose an incorrect header......

    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.