select 1 queries in production
Hey all, I'm trying to track down an inconsistency between dev and prod environments -
I'm using Neon postgres, and I'm finding that in my production environment, Prisma is running a
This looks like some kind of connection health check, but it's causing the connection from my application to Neon to never go fully idle, which means I'm winding up paying for uptime usage when it should be spinning down to zero when inactive.
I've verified it's coming from the PrismaPg adapter by patching the pool query to trace the source, but that hasn't gotten me very far. In prod, it's showing the pool acquire/release every 5 seconds, with the trace coming from
I'm using Neon postgres, and I'm finding that in my production environment, Prisma is running a
SELECT 1 query about every 5 seconds, but it doesn't seem to happen at all in development. I haven't been able to find any options about enabling/disabling this behavior, and I'm having trouble even figuring out what's triggering it it one environment and not the other. This looks like some kind of connection health check, but it's causing the connection from my application to Neon to never go fully idle, which means I'm winding up paying for uptime usage when it should be spinning down to zero when inactive.
I've verified it's coming from the PrismaPg adapter by patching the pool query to trace the source, but that hasn't gotten me very far. In prod, it's showing the pool acquire/release every 5 seconds, with the trace coming from
@prisma/client/runtime/library.js:6:6846 showing the SELECT 1 query.