I’m experiencing an urgent issue with our production sites that’s causing significant downtime:
form.feathery.io (site_id: 1146f6d0-aa21-46b5-a7a5-91212f6d0d53)
form.feathery.app (site_id: 4e9f7921-bebd-4405-b353-fcf90138fc02)
These are Nextjs applications that use the Nextjs Runtime v5.9.4. Before encountering this issue they were SSG and cached indefinitely with ISR strategy to revalidate the page. I’ve since completely disabled the Nextjs cache and now the entire site should be dynamic.
We are seeing some of our pages persist a cache through new deployments and even attempts to purge the cache explicitly. Because these pages are staying cached they are trying to fetch resources that no longer exist on the server.
If I purge the cache via the API endpoint https://api.netlify.com/api/v1/purge, the page will start working. However after some time, new requests to that page will revert back to the old response with the outdated HTML. Even after purging the cache, that old page is being persisted somewhere and eventually gets served again.
I’m sure something is misconfigured somewhere in my site, but I thought making the nextjs page dynamic and purging the cache would at least get my pages working again.
Cached (bad) response:
age: 385716
cache-control: public,max-age=0,must-revalidate
cache-status: "Netlify Durable"; hit; ttl=219083,
"Next.js"; hit, "Netlify Durable"; fwd=stale; fwd-status=304; ttl=243774,
"Netlify Edge"; fwd=miss
New response that loads correctly (after purging the cache):
age: 0
cache-control: private,no-cache,no-store,max-age=0,must-revalidate
cache-status: "Netlify Durable"; fwd=stale; ttl=218165, "Netlify Edge"; fwd=miss
Steps I’ve taken:
- Deployed new versions of the apps
- Redeployed the apps with “Clear cache and deploy” option
- Purged the site cache using https://api.netlify.com/api/v1/purge
I’m trying to figure out:
- Help investigate why our sites require constant cache purging to stay up. After purging the page will eventually revert back to the old cached version.
- Why a new deploy triggered from a git commit or redeploying with a cleared cache in Netlify causes some pages to break