Skip to content

Prisma calls hanging on Cloudflare Workers #128

Open
@jmif

Description

@jmif

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.

  1. Clone repo and add DATABASE_URL=xxx to .dev.vars in the root of the repo.
  2. Run npm run dev
  3. Performa GET request to the root route (port will be specified in npm run dev output)
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions