CPU usage spikes due to Plasmic reloads.

Hi, i have an issue with plasmic that i don’t understand, i have a nextJS app with a docker image deployed on a ECS on AWS, i made some charge test but my CPU got over 30% with around 2000 connections in 15sec, when i got a look at my logs i had a lot of reloads from plasmic, do you have any idea what could have trigger those multiple reload ?

Hi Wilem, do you have more information on which request you see being sent? Could you also point to your project id and a timestamp so that I can search through our logs too ?

i have repeatedly this is my logs Plasmic: doing a fresh fetch.

is it normal or is it duplicates fetch ?

this but multiple times

that’s the case for every page

By looking into our logs it seems to be a normal amount of requests coming to our server, what is the revalidate period of your catch all page ?

we put revalidate: 15,

its too much ?

the revalidate indicates how long in seconds a page can be served as cached in vercel, so when you say revalidate:15, it means that a page that is served, will be kept in cache for 15 seconds, so after 15 seconds your pages can be regenerated, which would mean new requests to plasmic and new logs, so if you intent it’s to reduce the number of fetch requests, you would need to increase this revalidate period

what would you recommend ? it’s not like we change the page every day

I would say 5 minutes (revalidate: 300) it’s pretty reasonable, this indicates that your pages will be cached for 5 minutes and the changes you do in the page may take 5 minutes to appear in prod

ok thanks i’ll do that