Skip to content

fix: eliminate ISR write explosion (200K writes exhausted)#636

Closed
codercatdev wants to merge 5 commits intodevfrom
fix/isr-write-explosion
Closed

fix: eliminate ISR write explosion (200K writes exhausted)#636
codercatdev wants to merge 5 commits intodevfrom
fix/isr-write-explosion

Conversation

@codercatdev
Copy link
Contributor

@codercatdev codercatdev commented Mar 13, 2026

Closing — these changes were already included in PR #635 (merged to dev as f7dacee). @videopipe combined the mapInputProps fix with the ISR fix in one PR.

Miriad and others added 5 commits March 13, 2026 02:34
Remove generateStaticParams() and associated unused imports (client, groq)
from all dynamic route pages. These were pre-rendering 450+ pages at build
time, creating massive ISR surface area that burned through Vercel's 200K
ISR write limit.

The site uses defineLive + SanityLive for real-time content updates,
making static pre-rendering unnecessary.

Files modified:
- app/(main)/(post)/post/[slug]/page.tsx
- app/(main)/(post)/blog/page/[num]/page.tsx
- app/(main)/(podcast)/podcast/[slug]/page.tsx
- app/(main)/(podcast)/podcasts/page/[num]/page.tsx
- app/(main)/(author)/author/[slug]/page.tsx
- app/(main)/(author)/authors/page/[num]/page.tsx
- app/(main)/(guest)/guest/[slug]/page.tsx
- app/(main)/(guest)/guests/page/[num]/page.tsx
- app/(main)/(sponsor)/sponsor/[slug]/page.tsx
- app/(main)/(sponsor)/sponsors/page/[num]/page.tsx
- app/(main)/(top-level-pages)/[slug]/page.tsx

Co-authored-by: research <research@miriad.systems>
Remove time-based ISR revalidation from all pages and sitemap.
These caused constant ISR writes on every visitor request:
- revalidate=60 on 7 listing pages (writes every minute per visitor)
- revalidate=3600 on 5 detail pages
- revalidate=86400 on 4 static pages
- revalidate=3600 on sitemap.ts

With defineLive + SanityLive handling real-time updates, time-based
ISR revalidation provides zero benefit while consuming ISR writes.

Files modified:
- app/(main)/page.tsx
- app/(main)/(post)/post/[slug]/page.tsx
- app/(main)/(post)/blog/page.tsx
- app/(main)/(post)/blog/page/[num]/page.tsx
- app/(main)/(podcast)/podcast/[slug]/page.tsx
- app/(main)/(podcast)/podcasts/page.tsx
- app/(main)/(podcast)/podcasts/page/[num]/page.tsx
- app/(main)/(author)/author/[slug]/page.tsx
- app/(main)/(author)/authors/page/[num]/page.tsx
- app/(main)/(guest)/guest/[slug]/page.tsx
- app/(main)/(guest)/guests/page/[num]/page.tsx
- app/(main)/(sponsor)/sponsor/[slug]/page.tsx
- app/(main)/(sponsor)/sponsors/page/[num]/page.tsx
- app/(main)/(top-level-pages)/[slug]/page.tsx
- app/(main)/(top-level-pages)/pro/page.tsx
- app/(main)/(top-level-pages)/sponsorships/page.tsx
- app/sitemap.ts

Co-authored-by: research <research@miriad.systems>
The webhook was firing revalidateTag("sanity") on EVERY Sanity document
change, including automated pipeline documents (automatedVideo,
contentIdea, sponsorLead, etc.) that update frequently via cron jobs.
Each webhook call invalidated ALL cached pages simultaneously.

Now skips internal/pipeline document types that have no public-facing
pages. For public content types, keeps revalidateTag("sanity") as a
fallback for when no active visitors trigger SanityLive updates.

Skipped types: automatedVideo, contentIdea, sponsorLead,
pipeline_config, content_config

Co-authored-by: research <research@miriad.systems>
The previous commit only removed imports but the sed pattern didn't
match the function bodies due to shell quoting issues with parentheses
in file paths. This commit removes the actual function bodies from all
11 pages.

Co-authored-by: research <research@miriad.systems>
Next.js 16 requires a second argument for revalidateTag.
Restore { expire: 0 } for immediate invalidation.

Co-authored-by: research <research@miriad.systems>
@vercel
Copy link

vercel bot commented Mar 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
codingcat-dev Ignored Ignored Mar 13, 2026 2:40am

@codercatdev codercatdev deleted the fix/isr-write-explosion branch March 13, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant