neondatabase / neondatabase/serverless
Prisma calls hanging on Cloudflare Workers
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 548
- Forks
- 81
- PR merge metrics
- No merged PRs in 30d
Description
Not sure if this is a Prisma issue or a Neon issue, so opening both (Prisma issue here)
When running with wrangler dev using Prisma + NeonDB, the promises from basic database calls do not resolve, but the results are reflected in the database. I've followed the instructions here.
Steps to reproduce
I've created a repro here.
- Clone repo and add DATABASE_URL=xxx to .dev.vars in the root of the repo.
- Run npm run dev
- Performa GET request to the root route (port will be specified in npm run dev output)
- The request should hang and you should see the first console.log statement but not the second. You should also see the data from the first call inserted into the database, but not from the second.
Expected result
Request does not hang and inserts two records.
Actual result
Request hangs, promise of initial query does not resolve, but initial query is successful in that it's result is reflected in database.
Environment
OS: macOS
Database: Neon Postgres 16
Node.js version: 20.11.1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked prisma-neon-cf-worker-repro, add DATABASE_URL to the root .dev.vars, and run npm run dev with wrangler dev. Exercise the root route and compare the first and second console.log statements with the records inserted into Neon Postgres. Done means the request completes and both records are inserted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, postgresql, typescript
- Domain
- backend, cloud, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100