/justin
TTCTheo's Typesafe Cult
•Created by /justin on 12/23/2023 in #questions
TRPC Client side fetch fails only in production
Howdy,
I just spun up a create-t3-turbo app and started rebuilding my project in it and am having a weird issue in production envs.
On localhost all works well, but when running on Vercel all of my client side requests routed through trpc are failing with 404 not found...
If anyone has any idea please lmk, thanks!
4 replies
TTCTheo's Typesafe Cult
•Created by /justin on 12/20/2022 in #questions
Planetscale + Prisma Connection Pool Limits
Does anyone understand connection pool limits? I'm a noob and am running into this issue:
Is it as simple as adding a custom connection limit in the database connection URL?
Any context on how connection pools operate in serverless infra would be very helpful, just trying to understand this more.
Thanks ❤️
16 replies
TTCTheo's Typesafe Cult
•Created by /justin on 12/13/2022 in #questions
Prisma query failing in NextJS deployment
I have a NextJS project which is using prisma and Planetscale. I have a webhook from Stripe where I read from one table and then write to another. The first prisma query always seems to fail. I have added other random queries before it, but it is always the first one which fails. After that failure/timeout (~5mins) the next request always runs instantly. When running locally everything works totally fine, but it always fails when deployed.
I am using global.prisma to ensure there is only one PrismaClient in the entire project (as described here)
I think this might be connection pool issue because the error message is this (but I'm not sure why this would be the problem):
1 replies
TTCTheo's Typesafe Cult
•Created by /justin on 11/11/2022 in #questions
How to enable tRPC (v10) queries that don't have data passed in them
Just updated to trpc v10 and have no idea how to enable/disable queries. Couldn't find anything in the docs. Here is what I'm trying that doesn't work:
trpc.subscription.getUserSubscription.useQuery(undefined, { enabled: !!user?.customer && !!user.individual })
8 replies