Nexjs high average response time #81920
-
We deployed a NextJS app with version 15.4.1 with SSR, and we use cache too, but the NextJS response time is too high, and it also gets down We use the method On-demand revalidation with revalidatePath |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi! 👋 A few things that helped me: ⚙️ 1. Avoid Revalidating Too Frequently Make sure you're not calling it on every request or from multiple places. Use logging to check if revalidations are stacking up. 🧠 2. Move Revalidation to Background ts export async function POST(req: Request) { 🔧 4. Profiling & Logs css |
Beta Was this translation helpful? Give feedback.
-
I found something, and I think it's working: export const revalidate = 300; |
Beta Was this translation helpful? Give feedback.
I found something, and I think it's working:
export const revalidate = 300;
export const dynamicParams = true;
export const dynamic = 'force-static';