Update README.md with Neon Postgres Option#498
Conversation
Add Neon Serverless Postgres as a Postgres option to integration with Prisma.
|
I have signed the CLA! |
|
Hi @siegerts thank you for your PR, but unfortunately we haven't tested Neon so I'm going to close this. |
|
Hi @matteodepalo! Is there a process or test suite that I can help test with? I'd be happy to work together if there's something else that's needed. |
|
We could keep this open, but the reality is we would have to do some manual testing ourselves and that means it will take some time to do it. I'll re-open it but we cannot promise anything in terms of timeline unfortunately. |
|
Thank you! Let me know if there is anything I can do to help or support - I'd be happy to jump in. |
|
@siegerts I’m trying to run neon on a new Shopify app and most of the times its ok, but sometimes I randomly get this error: (this is from vercel logs) The error message is non-sensical as Session table definately exists. But you can see at the start of the stacktrace I get: "[cause]: Error: Connection terminated unexpectedly". I thought that maybe this happens only on Neon boot, but this happens even with always-on Neon instance. Here’s my prisma init if useful: import { Pool, neonConfig } from '@neondatabase/serverless'
import { PrismaNeon } from '@prisma/adapter-neon'
import { PrismaClient } from '@prisma/client'
import ws from 'ws'
declare global {
var prisma: ReturnType<typeof prismaClientSingleton>
}
neonConfig.webSocketConstructor = ws
const prismaClientSingleton = () => {
const connectionString = `${process.env.DATABASE_URL}`
const pool = new Pool({ connectionString })
const adapter = new PrismaNeon(pool)
return new PrismaClient({ adapter })
}
export const prisma = globalThis.prisma ?? prismaClientSingleton()
if (process.env.NODE_ENV !== 'production') globalThis.prisma = prisma(I also use the neon -pooler) Any ideas on why this might happen? |
Add Neon Serverless Postgres as a Postgres option for integration with Prisma.
WHY are these changes introduced?
WHAT is this pull request doing?
Checklist
Note: once this PR is merged, it becomes a new release for this template.
README.mdfile and other related documentation, if applicable