question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PrismaClientUnknownRequestError: "Error in connector: Error querying the database: db error: FATAL: the database system is in recovery mode"

See original GitHub issue

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

Versions

Name Version
Node v14.16.1
OS debian-openssl-1.1.x
Prisma Client 2.21.2
Query Engine query-engine e421996c87d5f3c8f7eeadd502d4ad402c89464d
Database undefined

Query

mutation {
  updateOneOrder(
    where: {
      id: 5
    }
    data: {
      status: REFUNDED
      refunds: {
        create: {
          transaction: {
            create: {
              order: {
                connect: {
                  id: 5
                }
              }
              amount: 5
              paymentProcessor: STRIPE
              transactionId: "X"
              details: "X"
            }
          }
        }
      }
      tickets: {
        updateMany: {
          where: {

          }
          data: {
            status: REFUNDED
          }
        }
      }
    }
  ) {
    id
    shortId
    userId
    inviteeId
    purchaserId
    addressId
    paymentMethodId
    price
    discountAmount
    serviceFee
    promoterFee
    processorFee
    processorFeeCharged
    taxAmount
    status
    type
    delivery
    eventId
    promoLinkId
    createdAt
    updatedAt
    purchaser {
      id
      firstName
      lastName
      phoneNumber
      email
      createdAt
      updatedAt
    }
    event {
      name
      timezone
      venueName
    }
  }
}

Logs

odules/Order/actions/refundOrder/index.js:12:27)
    at async refundOrder (/app/src/modules/Order/resolvers.js:86:27)
    at async resolver (/app/src/common/errors/resolver.js:7:16)
prisma:engine stdout  Error in PostgreSQL connection: Error { kind: Closed, cause: None }
prisma:engine stdout  Error in PostgreSQL connection: Error { kind: Closed, cause: None }
prisma:engine stdout  Error in PostgreSQL connection: Error { kind: Closed, cause: None }
prisma:engine stdout  Error in PostgreSQL connection: Error { kind: Closed, cause: None }
prisma:client Error: Server has closed the connection.
    at NodeEngine.graphQLToJSError (/app/node_modules/.prisma/client/runtime/index.js:27489:16)
    at NodeEngine.request (/app/node_modules/.prisma/client/runtime/index.js:27387:24)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async cb (/app/node_modules/.prisma/client/runtime/index.js:34750:26)
    at async /app/src/common/prisma/retry.js:35:32
    at async Object.exports.default (/app/src/modules/Order/actions/refundOrder/refundCustomer.js:17:19)
    at async Object.exports.default [as refundOrder] (/app/src/modules/Order/actions/refundOrder/index.js:12:27)
    at async refundOrder (/app/src/modules/Order/resolvers.js:86:27)
    at async resolver (/app/src/common/errors/resolver.js:7:16)
prisma:engine stdout  Error in PostgreSQL connection: Error { kind: Closed, cause: None }
prisma:engine {
  error: PrismaClientUnknownRequestError2 [PrismaClientUnknownRequestError]: Error in connector: Error querying the database: db error: FATAL: the database system is in recovery mode
      at NodeEngine.graphQLToJSError (/app/node_modules/.prisma/client/runtime/index.js:27491:14)
      at NodeEngine.request (/app/node_modules/.prisma/client/runtime/index.js:27387:24)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:93:5)
      at async cb (/app/node_modules/.prisma/client/runtime/index.js:34750:26)
      at async /app/src/common/prisma/retry.js:35:32
      at async Object.exports.default (/app/src/modules/Order/actions/refundOrder/refundCustomer.js:17:19)
      at async Object.exports.default [as refundOrder] (/app/src/modules/Order/actions/refundOrder/index.js:12:27)
      at async refundOrder (/app/src/modules/Order/resolvers.js:86:27)
      at async resolver (/app/src/common/errors/resolver.js:7:16) {
    clientVersion: '2.21.2'
  }
}
prisma:engine {
  error: PrismaClientUnknownRequestError2 [PrismaClientUnknownRequestError]: Error in connector: Error querying the database: db error: FATAL: the database system is in recovery mode
      at NodeEngine.graphQLToJSError (/app/node_modules/.prisma/client/runtime/index.js:27491:14)
      at NodeEngine.request (/app/node_modules/.prisma/client/runtime/index.js:27387:24)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:93:5)
      at async cb (/app/node_modules/.prisma/client/runtime/index.js:34750:26)
      at async /app/src/common/prisma/retry.js:35:32
      at async Object.exports.default (/app/src/modules/Order/actions/refundOrder/refundCustomer.js:17:19)
      at async Object.exports.default [as refundOrder] (/app/src/modules/Order/actions/refundOrder/index.js:12:27)
      at async refundOrder (/app/src/modules/Order/resolvers.js:86:27)
      at async resolver (/app/src/common/errors/resolver.js:7:16) {
    clientVersion: '2.21.2'
  }
}
prisma:engine {
  error: PrismaClientUnknownRequestError2 [PrismaClientUnknownRequestError]: Error in connector: Error querying the database: db error: FATAL: the database system is in recovery mode
      at NodeEngine.graphQLToJSError (/app/node_modules/.prisma/client/runtime/index.js:27491:14)
      at NodeEngine.request (/app/node_modules/.prisma/client/runtime/index.js:27387:24)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:93:5)
      at async cb (/app/node_modules/.prisma/client/runtime/index.js:34750:26)
      at async /app/src/common/prisma/retry.js:35:32
      at async Object.exports.default (/app/src/modules/Order/actions/refundOrder/refundCustomer.js:17:19)
      at async Object.exports.default [as refundOrder] (/app/src/modules/Order/actions/refundOrder/index.js:12:27)
      at async refundOrder (/app/src/modules/Order/resolvers.js:86:27)
      at async resolver (/app/src/common/errors/resolver.js:7:16) {
    clientVersion: '2.21.2'
  }
}

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Syttencommented, May 3, 2021

Yeah exactly

0reactions
janpiocommented, May 3, 2021

I updated the issue title @Sytten. Is this the correct error that is currently considered as unknown, but probably should not be?

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found