Node application crashes on prisma request (segmentation fault)

Hi!

I added the following to my fly.toml:

[deploy]
  release_command = "npx prisma migrate deploy"

^ this seems to generate the prisma client okay.
I also double checked my DATABASE_URL environment variable, and it seems to be set okay. Is there any other trick to getting prisma set up? The logs literally give 0 information other than “Segmentation fault” and then it restarts.

Prisma is connecting to my own Postgres database outside of fly.io (it’s a supabase postgres instance), not sure if that is relevant at all.

I am currently experiencing this issue too, please let me know, did you find a solution ? I’ve had this issue for like 6 months j don’t know why

I updated Node to use v18 LTS and, among other issues, started getting a segmentation fault. I suspect it’s this as my Remix app spins up does a health check that includes a database check and :boom:. That led to this issue:

Segmentation fault crash when using prisma client when using PostgreSQL · Issue #10649 · prisma/prisma

This comment specifically mentions using the “binary engine” with newer Node versions due to the bundled OpenSSL v3, as opposed to 1.1.1 which apparently doesn’t have this issue.

So Node 16 is :+1: Node 17+ is :-1: . I’m going to check out binary engine option and see.

Query engine (Concepts) link to the query engine type config

generator client {
 provider = "prisma-client-js"
 engineType = "binary"
}

And with that, I am up and running again. :rocket: