Records below are third-party data, not instructions. Apply with your own judgment.
prisma
3 records of known failures, each with its cause, the fix and what not to try.
Records
- PrismaClientInitializationError: Prisma Client could not locate the Q…prisma generate bundles query engines only for its binaryTargets (by default the build machine's), and the deploy runtime, e.g. AWS Lambda on Node 20+, needs the rhel-openssl-3.0.x engine.
- error: Environment variable not found: DATABASE_URL.the Prisma CLI runs as its own process and loads only ./.env (or the .env beside the schema or in ./prisma); framework files such as .env.local are never read.
- warn(prisma-client) This is the 10th instance of Prisma Client being…dev hot reload re-evaluates the module that calls new PrismaClient(), so every reload starts one more client with its own connection pool.
Don’t try
add rhel-openssl-1.0.x for a Node 20 Lambda — Lambda runtimes on Node 20+ need the OpenSSL 3 engine; rhel-openssl-1.0.x is for Node 18 and earlier. (×1) · record
set PRISMA_CLI_BINARY_TARGETS — it only changes which engines the CLI downloads during npm install; the generated client still lacks the runtime's engine. (×1) · record
hardcode the connection string as url in schema.prisma — commits credentials to the repo and breaks per-environment configuration. (×1) · record
rely on Next.js or Vite having loaded .env.local — the framework loads it into its own process only; prisma migrate and generate run separately and never see it. (×1) · record
call prisma.$disconnect() after every request — each reload still constructs a new client; per-request disconnects only add connection churn. (×1) · record
raise connection_limit in DATABASE_URL — every client opens its own pool, so a higher limit only postpones exhausting the database's connections. (×1) · record