Hi Vercel team,
My Hobby team (team ID: team_IrTNwiOhlITEhibgSxW4WOU8) has been paused since Nov 24 for exceeding Fluid Active CPU. The projects are besafe-app (homesafeeducation.com) and timecraftadvisory-website.
The site barely has any real users. Apart from the blog, it's essentially unused, so the CPU wasn't coming from customers. I tracked it down to a mistake in my own code:
- The root layout had
export const dynamic = 'force-dynamic'and read cookies(). That forced every page, including ~3,000 static blog articles, to be server-rendered on every request, so every crawler or reader hit ran a function. - Middleware was also refreshing the Supabase session on every request (blog pages and images included), and two client components called API routes (/api/me and /api/geo) on every page view.
I've fixed all of it on main (commits 501bc29, 92478b3, 8e130af, dcd3b1f):
- Removed force-dynamic and cookies() from the root layout, so the blog and other public pages are now statically generated and served from cache
- Middleware now skips the blog, static assets and anonymous visitors
- /api/me only runs for logged-in users, and the geo lookup is cached per visitor
This should cut function usage by well over 90%. timecraftadvisory-website used about a minute of CPU all year and is only down because it's in the same team.
Could you please unpause the team so I can deploy the fix? I'll keep an eye on the Usage page afterwards to confirm it stays well under the limits.
Thanks, BrickBox