Help me debug why SSG/ISR pages goes into cold start on inactivity.
Answered
Brown bear posted this in #help-forum
Brown bearOP
Hi, these are SSG/ISR pages which should be cached. However, if you see the vercel logs, the route
Any idea?
/category/insurance goes into a serverless function and have a response time of 2s due to cold start. This should be cached on build.Any idea?
Answered by Brown bear
I think I know why. I am using searchParams from the page props because there is pagination. Let me shif the pagination into client component and see how.
13 Replies
Brown bearOP
There are no suspense used in the page.
Once it warmed up, response dropped to 68ms
this says serverless function
Brown bearOP
yes. how come?
lets investigate 

Brown bearOP
it should be ISR
can you paste full build log route summary?
in the vercel dashboard
Brown bearOP
@aardani
Brown bearOP
I think I know why. I am using searchParams from the page props because there is pagination. Let me shif the pagination into client component and see how.
Answer
oh...
Brown bearOP
ok I changed into this format
/category/insurance/2 for pagination. Looks like no more serverless function for the base page!