prisma / prisma-client-js

Type-safe database client for TypeScript & Node.js (ORM replacement)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Started http server

vovanmix opened this issue · comments

Hi Prisma Team! My Prisma Client just crashed. This is the report:

Versions

Name Version
Node v12.18.2
OS rhel-openssl-1.0.x
Prisma 2.5.1

Description

signalCode: SIGABRT | exitCode: null | killed: false
SocketError: other side closed
    at Socket.onSocketEnd (/var/task/node_modules/@prisma/client/runtime/index.js:1:10302)
    at Socket.emit (events.js:327:22)
    at Socket.EventEmitter.emit (domain.js:482:12)
    at endReadableNT (_stream_readable.js:1221:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Exit code: null
Started http server

Logs

prisma-client {
  engineConfig: {
    cwd: '/var/task/node_modules/.prisma/client',
    enableDebugLogs: false,
    enableEngineDebugMode: undefined,
    datamodelPath: '/var/task/node_modules/.prisma/client/schema.prisma',
    prismaPath: undefined,
    engineEndpoint: undefined,
    generator: {
      name: 'client',
      provider: 'prisma-client-js',
      output: '/app/node_modules/@prisma/client',
      binaryTargets: [Array],
      previewFeatures: [],
      config: {}
    },
    showColors: false,
    logLevel: undefined,
    logQueries: undefined,
    flags: [],
    clientVersion: '2.5.1',
    enableExperimental: [],
    useUds: undefined
  }
}
plusX Execution permissions of /var/task/node_modules/.prisma/client/query-engine-rhel-openssl-1.0.x are fine
prisma-client Client Version 2.5.1
prisma-client Engine Version c88925ce44a9b89b4351aec85ba6a28979d2658e
plusX Execution permissions of /var/task/node_modules/.prisma/client/query-engine-rhel-openssl-1.0.x are fine
plusX Execution permissions of /var/task/node_modules/.prisma/client/query-engine-rhel-openssl-1.0.x are fine

I figured it out, the problem was because the mysql query was taking ~20 seconds. The error message is not really clear, it would be nice to change the message be more relevant

That indeed does not really make sense. Any mysql query taking longer than 20 seconds triggering this behavior for you?

I am not sure how we can identify the bug here without a minimal reproduction.

I tried to simulate a time consuming query with SLEEP(30) but it succeeds:

image

@vovanmix If possible can you please share your schema and original query which cause this? That would be helpful here.

Also, I used version 2.7.0

Ah, ok. Can you try adding this again with the latest version and adding this option to the prisma client constructor if you still have the old failing query:

const prisma = new PrismaClient({
    __internal: {
      useUds: true,
    },
  } as any);

This will use a different protocol for communication between prisma client and prisma engine which might solve your issue.

I am going to close this as its been 3 months now and there is no activity here.

Please reply if you want us to take another look.