fix: eliminate ISR write explosion (200K writes exhausted)#636
Closed
codercatdev wants to merge 5 commits intodevfrom
Closed
fix: eliminate ISR write explosion (200K writes exhausted)#636codercatdev wants to merge 5 commits intodevfrom
codercatdev wants to merge 5 commits intodevfrom
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.