β All fixes
Ship failure
First request takes 8 seconds (cold start)
The fix
For Vercel: move heavy initialization out of the handler into module scope so it caches across warm invocations. For Supabase/Postgres: use a connection pooler (PgBouncer) β direct connections cold-start slow. For function size: trim deps, the larger the function the slower the cold start.
Deeper dive: read the full article β