Netlify – tRPC crashes after every deployment
Whenever I make any changes to
[trpc].ts
, the website crashes for all users. Each user needs to refresh the page (sometimes more than once) to bypass this error.
The logs don't show any strange behavior other than this same message every time:
Task timed out after 10.02 seconds
6 Replies
your function is running too slow
but that only happens on the first request from each user, independently, and only right after a new deployment.
and only if I had modified
[trpc].ts
specificallyyour cold start time is too high then
I thought cold starts should be independent from the user. The functions just make Prisma queries that are independent from the user.
Prisma is very slow for cold starts
Even if Prisma is not involved, it still fails on the first request, for each user individually
The issue was gone after I switched to Vercel ✅