Intermittent prisma crashes

Using my RW e-commerce storefront I get intermittent prisma crashes. I can reload the page for a product 6 times just fine, and then on the 7th try (or whatever number of retry) the prisma client crashes for me. Since I’m new to the whole world of apollo, prisma, gql etc I don’t really know where to start troubleshooting this. Any pointers are greatly appreciated :slight_smile:

This is the error I get

Error: GraphQL error: Invalid prisma.product.findMany() invocation in /var/task/src/api/dist/services/products/products.js:14:25 Unknown error in Prisma Client This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic.

And then, I get a link to submit a bug report with the following content.


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

Versions

Name Version
Node v12.16.3
OS rhel-openssl-1.0.x
Prisma 2.2.2

Logs

2020-07-16T19:45:50.899Z prisma-client {
  engineConfig: {
    cwd: '/var/task/src/node_modules/.prisma/client',
    debug: false,
    datamodelPath: '/var/task/src/node_modules/.prisma/client/schema.prisma',
    prismaPath: undefined,
    engineEndpoint: undefined,
    generator: {
      name: 'client',
      provider: 'prisma-client-js',
      output: '/opt/build/repo/node_modules/@prisma/client',
      binaryTargets: [Array],
      experimentalFeatures: [Array],
      config: {}
    },
    showColors: false,
    logLevel: undefined,
    logQueries: undefined,
    flags: [],
    clientVersion: '2.2.2',
    enableExperimental: [ 'aggregations' ]
  }
}
2020-07-16T19:45:50.991Z prisma-client Prisma Client call:
2020-07-16T19:45:50.992Z prisma-client prisma.product.findMany(undefined)
2020-07-16T19:45:50.992Z prisma-client Generated request:
2020-07-16T19:45:50.992Z prisma-client query {
  findManyProduct {
    id
    name
    desc
    longDesc
    price
    imgUrl
    createdAt
    sku
    productId
  }
}

2020-07-16T19:45:51.007Z plusX Execution permissions of /var/task/src/node_modules/.prisma/client/query-engine-rhel-openssl-1.0.x are fine
2020-07-16T19:45:51.246Z prisma-client Client Version 2.2.2
2020-07-16T19:45:51.246Z prisma-client Engine Version a9e8c3d97ef2a0cf59256e6b26097f2a80f0a6a4
2020-07-16T19:46:08.195Z prisma-client Prisma Client call:
2020-07-16T19:46:08.195Z prisma-client prisma.product.findMany(undefined)
2020-07-16T19:46:08.195Z prisma-client Generated request:
2020-07-16T19:46:08.195Z prisma-client query {
  findManyProduct {
    id
    name
    desc
    longDesc
    price
    imgUrl
    createdAt
    sku
    productId
  }
}

2020-07-16T19:47:27.760Z prisma-client Prisma Client call:
2020-07-16T19:47:27.760Z prisma-client prisma.product.findMany(undefined)
2020-07-16T19:47:27.760Z prisma-client Generated request:
2020-07-16T19:47:27.760Z prisma-client query {
  findManyProduct {
    id
    name
    desc
    longDesc
    price
    imgUrl
    createdAt
    sku
    productId
  }
}


Can anyone spot anything that looks out of the ordinary? Anything to help me debug this?

Can you share the code around /var/task/src/api/dist/services/products/products.js:14 ?

I might be wrong but it might be an issue with the parameters you are giving to your findMany call. Could some of them be complex stuff? like variables coming from asyncs ?
What’s your db engine? Have you observed its activity when this happens?

@noire.munich Thanks for taking the time to reply to me :slight_smile:

This is products.js

import { db } from 'src/lib/db'

export const products = () => {
  return db.product.findMany()
}

export const product = ({ id }) => {
  return db.product.findOne({
    where: { id },
  })
}

export const createProduct = ({ input }) => {
  return db.product.create({
    data: input,
  })
}

export const updateProduct = ({ id, input }) => {
  return db.product.update({
    data: input,
    where: { id },
  })
}

export const deleteProduct = ({ id }) => {
  return db.product.delete({
    where: { id },
  })
}

I’m using a Postgres db on Heruko, not sure how I can check DB activity.

This is my schema if that’s relevant

datasource DS {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

generator client {
  provider      = "prisma-client-js"
  binaryTargets = env("BINARY_TARGET")
}

model Product {
  id        Int      @default(autoincrement()) @id
  name      String
  desc      String?
  longDesc  String?
  price     Int?
  imgUrl    String?
  createdAt DateTime @default(now())
  sku       String?
  productId String?
}
1 Like

No problem :slight_smile:

Ok so, I have more complex schema than this and worst methods, they work fine on my side.

DB engine can be a problem and I’ve had a couple of month ago to replace my binary because its version was corrupted, you may want to dig into this.

As for Heroku’s can’t say it always is satisfying, but I’m rather new on it. Is it free or paid plan? Have you tried rebuilding the entire db? Have you tried using postgres with a different Heroku addon? ( if available, that I am not sure about )

Last but not least your method call should fail if the wrong type is provided for your variables, have you logged your arguments and what do they look like when the issue happens?

( oh and please, let’s have a look at your product.sdl.js as well )

export const schema = gql`
  type Product {
    id: Int!
    name: String!
    desc: String
    longDesc: String
    price: Int
    imgUrl: String
    createdAt: DateTime!
  }

  type Query {
    products: [Product!]!
    product(id: Int!): Product!
  }

  input CreateProductInput {
    name: String!
    desc: String!
    longDesc: String!
    price: Int!
    imgUrl: String
  }

  input UpdateProductInput {
    name: String
    desc: String
    longDesc: String
    price: Int
    imgUrl: String
  }

  type Mutation {
    createProduct(input: CreateProductInput!): Product!
    updateProduct(id: Int!, input: UpdateProductInput!): Product!
    deleteProduct(id: Int!): Product!
  }
`

The thing is that it’s complaining about findAll, which doesn’t take any arguments at all.

I’m on Heroku’s free plan. But I’ve got Postgres installed locally as well. I’m going to run against that for a bit, and see if I get the same problem there as well

About findMany, my logic is that findMany is used under the hood by other methods such as update -you do have the update around there, so I’m poking around the theory.

Either way nothing about your code looks esoteric enough to have prisma throw a tantrum.

Out of curiosity did you have a forced maintenance by heroku predating the problem?

Couple more ideas to debug: run the prisma command yourself if possible to see if you can get something out of it, and try the code in a dummy project. These two would be the last brutal things to try and shake the debugging tree I would see.

Next step would be sharing a repo and some core team rescue.

I am having the same issue after upgrading to 0.15

api | error creating user PrismaClientInitializationError: 
api | Invalid `prisma.user.findOne()` invocation in
api | /Users/nivb/Sites/redwoodeasyeditor/api/src/lib/auth.js:28:32
api | 
api | 
api |   Invalid feature flag: aggregations
api |     at PrismaClientFetcher.request (/Users/nivb/Sites/redwoodeasyeditor/node_modules/@prisma/client/src/runtime/getPrismaClient.ts:1158:15)
api |     at processTicksAndRejections (internal/process/task_queues.js:94:5)
api | POST /graphql 200 1231.747 ms - 333

auth.js

  if (!token || type != 'auth0' || !decoded?.sub) {
    return decoded
  }

  try {
    const user = await db.user.findOne({
      where: {
        userId: decoded.sub,
      },
    })

deleting node_modules and running yarn install again solved this issue

2 Likes

Ah, thanks for this @NiviJah We’re getting lots of questions about this and I added some help to the Release Notes just now.

It caught me a couple times when I was learning to understand Prisma, but anytime you see something like:

Invalid prisma.user.findOne() invocation in

I now just automatically re-run yarn rw db up 'cause it means something off (of missing) with my generated Prisma Client. :upside_down_face:

Finally spent some more time on this.

I have simplified it to a custom function that still reproduces the error every now and then…

import { db } from 'src/lib/db'

exports.handler = async (event, context, callback) => {
  try {
    const id = parseInt(event.queryStringParameters.id || '2', 10)

    const product = await db.product.findOne({
      where: { id },
    })

    return {
      statusCode: 200,
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify(product)
    }
  } catch (error) {
    console.error(error)

    return {
      statusCode: 500,
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify(error)
    }
  }
}

Looking at the logs, out of 303 invocations I triggered the error twice.

I am now working on a standalone prisma-only project, to see if I can reproduce it there as well, but so far it’s working 100% of the time

3 Likes

@Tobbe Seems you are not alone:

I cannot reproduce this reliably. I see it happen in about 10-20% of my test runs on our CI server, which runs postgres in a docker image. I suspect it has something to do with postgres being unresponsive or slow when the build node is very busy. When I rerun with the exact same configuration, it doesn’t happen again (90% of the time).

Have you tried to add Prisma logging to see if it provides any useful info?

In api/src/lib/db.js

export const db = new PrismaClient({
  log: ['query', 'info', 'warn'],
});

This logs all log levels:

  • query: Logs the SQL queries that are generated by a Prisma Client API call
  • info: Logs general information
  • warn: Logs warnings

I’d be curious to see what if anything it might show. Maybe will point in a certain direction?

Yes, there are several of them :slightly_frowning_face:

I’ll try logging. Thanks!

Just managed to reproduce this with a simple curl call

$ curl -s https://MY_SITE.netlify.app/.netlify/functions/prisma?id=91

But it seems like it’s timing related. I ran that curl command in a loop 300 times, and no issue what so ever. Then I waited a minute or two, and ran the command again. And immediately it failed. Unfortunately I hadn’t turned on logging yet when I did that

1 Like

@Tobbe Do the Netlify function logs say anything interesting? Like memory or time to execute/initialize?

Duration: 479.97 ms	Memory Usage: 177 MB	Init Duration: 1612.85 ms

Edit: just as I posted, I saw yours w/ logs :wink:

Turned on logging, and made it crash. Didn’t tell me much though :frowning:

7:59:30 PM: 2020-07-31T17:59:30.760Z	0f546647-46d1-425c-b655-d39a0a833629	ERROR	prisma:info  Starting a postgresql pool with up to 1 connections.
7:59:30 PM: 2020-07-31T17:59:30.803Z	0f546647-46d1-425c-b655-d39a0a833629	ERROR	prisma:info  Started http server on 127.0.0.1:34503
7:59:31 PM: 2020-07-31T17:59:31.543Z	0f546647-46d1-425c-b655-d39a0a833629	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
7:59:31 PM: Duration: 1027.46 ms	Memory Usage: 112 MB	Init Duration: 265.01 ms	
7:59:34 PM: 2020-07-31T17:59:34.108Z	902c473b-cdaf-4d65-9d2f-b0e442b6871b	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
7:59:34 PM: Duration: 75.89 ms	Memory Usage: 112 MB	
7:59:35 PM: 2020-07-31T17:59:35.772Z	ce5d6d6c-7d84-4c27-880c-dbf6ca3da8d7	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
7:59:35 PM: Duration: 76.24 ms	Memory Usage: 113 MB	
7:59:36 PM: 2020-07-31T17:59:36.626Z	3581ea5d-b53b-4d13-862b-8c1dc6bfe7c5	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
7:59:38 PM: 2020-07-31T17:59:38.833Z	cecf1744-d5d6-4b67-b7f2-514381707aeb	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
7:59:38 PM: Duration: 76.38 ms	Memory Usage: 114 MB	
7:59:54 PM: 2020-07-31T17:59:54.131Z	56c17e90-896d-4dee-987d-23c993e1f90b	ERROR	prisma:query SELECT 1
7:59:54 PM: 2020-07-31T17:59:54.203Z	56c17e90-896d-4dee-987d-23c993e1f90b	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3

7:59:54 PM: Duration: 167.76 ms	Memory Usage: 115 MB	
8:00:54 PM: 2020-07-31T18:00:54.442Z	ff3558fe-f958-4507-ae47-47780b8ef176	
ERROR	PrismaClientUnknownRequestError: Invalid `prisma.product.findOne()` invocation in/var/task/src/api/dist/functions/prisma.js:15:42  
Unknown error in Prisma ClientThis is a non-recoverable error which probably happens when the Prisma Query Engine has a panic.https://github.com/prisma/prisma-client-js/issues/new?body=Hi+Prisma+Team%21+My+Prisma+Client+just+crashed.+This+is+the+report%3A%0A%23%23+Versions%0A%0A%7C+Name+++++%7C+Version++++++++++++%7C%0A%7C----------%7C--------------------%7C%0A%7C+Node+++++%7C+v12.18.2+++++++++++%7C+%0A%7C+OS+++++++%7C+rhel-openssl-1.0.x+%7C%0A%7C+Prisma+++%7C+2.2.2++++++++++++++%7C%0A%0A%23%23+Logs%0A%60%60%60%0A2020-07-31T17%3A59%3A30.507Z+prisma-client+%7B%0A++engineConfig%3A+%7B%0A++++cwd%3A+%27%2Fvar%2Ftask%2Fsrc%2Fnode_modules%2F.prisma%2Fclient%27%2C%0A++++debug%3A+false%2C%0A++++datamodelPath%3A+%27%2Fvar%2Ftask%2Fsrc%2Fnode_modules%2F.prisma%2Fclient%2Fschema.prisma%27%2C%0A++++prismaPath%3A+undefined%2C%0A++++engineEndpoint%3A+undefined%2C%0A++++generator%3A+%7B%0A++++++name%3A+%27client%27%2C%0A++++++provider%3A+%27prisma-client-js%27%2C%0A++++++output%3A+%27%2Fopt%2Fbuild%2Frepo%2Fnode_modules%2F%40prisma%2Fclient%27%2C%0A++++++binaryTargets%3A+%5BArray%5D%2C%0A++++++experimentalFeatures%3A+%5BArray%5D%2C%0A++++++config%3A+%7B%7D%0A++++%7D%2C%0A++++showColors%3A+false%2C%0A++++logLevel%3A+%27info%27%2C%0A++++logQueries%3A+true%2C%0A++++flags%3A+%5B%5D%2C%0A++++clientVersion%3A+%272.2.2%27%2C%0A++++enableExperimental%3A+%5B+%27aggregations%27+%5D%0A++%7D%0A%7D%0A2020-07-31T17%3A59%3A30.527Z+prisma-client+Prisma+Client+call%3A%0A2020-07-31T17%3A59%3A30.528Z+prisma-client+prisma.product.findOne%28%7B%0A++where%3A+%7B%0A++++id%3A+155%0A++%7D%0A%7D%29%0A2020-07-31T17%3A59%3A30.528Z+prisma-client+Generated+request%3A%0A2020-07-31T17%3A59%3A30.528Z+prisma-client+query+%7B%0A++findOneProduct%28where%3A+%7B%0A++++id%3A+155%0A++%7D%29+%7B%0A++++id%0A++++name%0A++++desc%0A++++longDesc%0A++++price%0A++++imgUrl%0A++++createdAt%0A++++sku%0A++++productId%0A++%7D%0A%7D%0A%0A2020-07-31T17%3A59%3A30.542Z+plusX+Execution+permissions+of+%2Fvar%2Ftask%2Fsrc%2Fnode_modules%2F.prisma%2Fclient%2Fquery-engine-rhel-openssl-1.0.x+are+fine%0A2020-07-31T17%3A59%3A30.804Z+prisma-client+Client+Version+2.2.2%0A2020-07-31T17%3A59%3A30.804Z+prisma-client+Engine+Version+a9e8c3d97ef2a0cf59256e6b26097f2a80f0a6a4%0A2020-07-31T17%3A59%3A34.035Z+prisma-client+Prisma+Client+call%3A%0A2020-07-31T17%3A59%3A34.035Z+prisma-client+prisma.product.findOne%28%7B%0A++where%3A+%7B%0A++++id%3A+155%0A++%7D%0A%7D%29%0A2020-07-31T17%3A59%3A34.035Z+prisma-client+Generated+request%3A%0A2020-07-31T17%3A59%3A34.035Z+prisma-client+query+%7B%0A++findOneProduct%28where%3A+%7B%0A++++id%3A+155%0A++%7D%29+%7B%0A++++id%0A++++name%0A++++desc%0A++++longDesc%0A++++price%0A++++imgUrl%0A++++createdAt%0A++++sku%0A++++productId
8:00:54 PM: Duration: 8.11 ms	Memory Usage: 115 MB	
8:01:35 PM: 2020-07-31T18:01:35.808Z	e1c3e73a-3f9c-4015-b65d-76b95d240223	ERROR	prisma:query SELECT 1
8:01:35 PM: 2020-07-31T18:01:35.880Z	e1c3e73a-3f9c-4015-b65d-76b95d240223	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:01:35 PM: Duration: 148.01 ms	Memory Usage: 115 MB	
8:02:02 PM: 2020-07-31T18:02:02.490Z	87d968a4-4171-4668-bb2e-797d0ab5c30d	ERROR	prisma:query SELECT 1
8:02:02 PM: 2020-07-31T18:02:02.563Z	87d968a4-4171-4668-bb2e-797d0ab5c30d	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:06 PM: Duration: 76.17 ms	Memory Usage: 115 MB	
8:02:26 PM: 2020-07-31T18:02:26.941Z	96ff83f9-c96d-49b2-a7ca-52871c871426	ERROR	prisma:query SELECT 1
8:02:27 PM: 2020-07-31T18:02:27.014Z	96ff83f9-c96d-49b2-a7ca-52871c871426	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:27 PM: Duration: 148.16 ms	Memory Usage: 115 MB	
8:02:28 PM: 2020-07-31T18:02:28.970Z	3cb1f512-c6c3-4d67-b717-aa1b460f2135	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:28 PM: Duration: 75.35 ms	Memory Usage: 115 MB	
8:02:33 PM: Duration: 75.18 ms	Memory Usage: 115 MB	
8:02:34 PM: 2020-07-31T18:02:33.189Z	b168d461-ce85-4928-8db4-a2132fdb90d9	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:34 PM: 2020-07-31T18:02:34.113Z	067d6e14-e50c-4780-85f9-78e75ce970a8	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:34 PM: Duration: 75.75 ms	Memory Usage: 115 MB	
8:02:34 PM: 2020-07-31T18:02:34.678Z	603f172c-06a5-432c-aaad-8621d8694a30	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:34 PM: Duration: 76.03 ms	Memory Usage: 115 MB	
8:02:35 PM: 2020-07-31T18:02:35.047Z	747be201-076f-4f08-ab56-c9b8cc854024	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:35 PM: Duration: 80.03 ms	Memory Usage: 115 MB	
8:02:35 PM: 2020-07-31T18:02:35.683Z	78eb5756-e2bb-4657-ae51-d287c46a8622	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:35 PM: Duration: 75.31 ms	Memory Usage: 115 MB	
8:02:36 PM: 2020-07-31T18:02:36.455Z	69ee8650-af55-4dba-b1ba-850c5e336d3f	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:36 PM: Duration: 75.44 ms	Memory Usage: 115 MB	
8:02:37 PM: 2020-07-31T18:02:37.238Z	4f8f2f90-6ee8-49c7-aeb0-f3790fcdbfa1	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:37 PM: Duration: 75.53 ms	Memory Usage: 115 MB	
8:02:38 PM: 2020-07-31T18:02:38.174Z	02363b5b-a3a5-4f9f-9711-03fb13363c3d	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:38 PM: Duration: 75.98 ms	Memory Usage: 115 MB	
8:02:39 PM: 2020-07-31T18:02:39.010Z	bd166708-ef2c-47cc-9cc1-3d84ed143b54	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:39 PM: Duration: 75.53 ms	Memory Usage: 115 MB	
8:02:39 PM: 2020-07-31T18:02:39.796Z	75d4ef35-1f44-496b-bc6c-0ad1a2940569	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:39 PM: Duration: 75.61 ms	Memory Usage: 115 MB	
8:02:40 PM: 2020-07-31T18:02:40.747Z	ab283cb1-e3c7-43d4-92d8-9905ab95ba63	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:40 PM: Duration: 77.52 ms	Memory Usage: 115 MB	
8:02:41 PM: 2020-07-31T18:02:41.834Z	9f4dadce-c83c-4150-be73-0131b4391599	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:41 PM: Duration: 75.55 ms	Memory Usage: 115 MB	
8:02:42 PM: 2020-07-31T18:02:42.845Z	30bb2ba6-8cef-44a2-a775-68f6a3868fad	ERROR	prisma:query SELECT 1
8:02:42 PM: 2020-07-31T18:02:42.918Z	30bb2ba6-8cef-44a2-a775-68f6a3868fad	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:42 PM: Duration: 148.79 ms	Memory Usage: 115 MB	
8:02:43 PM: 2020-07-31T18:02:43.928Z	a2218a85-37fb-4b29-988e-d21a55fcdd57	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:43 PM: Duration: 75.33 ms	Memory Usage: 115 MB	
8:02:45 PM: 2020-07-31T18:02:45.048Z	80c81cf6-4462-4697-be50-f9a31e9743aa	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:45 PM: Duration: 75.47 ms	Memory Usage: 115 MB	
8:02:45 PM: 2020-07-31T18:02:45.986Z	c122d7ca-1a4a-4ed1-b056-c221be727cd8	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:45 PM: Duration: 75.91 ms	Memory Usage: 115 MB	
8:02:46 PM: 2020-07-31T18:02:46.975Z	643096d1-5e93-47b1-a50d-d221b4252176	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:46 PM: Duration: 75.82 ms	Memory Usage: 115 MB	
8:02:47 PM: 2020-07-31T18:02:47.782Z	5a0fab69-1c94-47cc-bc25-dd2934fea5af	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:47 PM: Duration: 75.57 ms	Memory Usage: 115 MB	
8:02:48 PM: 2020-07-31T18:02:48.558Z	c83c7e6d-4fec-438a-b09b-c53b2cdaed3a	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:48 PM: Duration: 75.51 ms	Memory Usage: 115 MB	
8:02:49 PM: 2020-07-31T18:02:49.352Z	c2d624ec-c1c3-4290-afb8-e40388c7f7be	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:49 PM: Duration: 75.42 ms	Memory Usage: 115 MB	
8:02:50 PM: 2020-07-31T18:02:50.650Z	acc0f60f-d9e9-455b-90b4-a6c62360c8d8	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:50 PM: Duration: 75.24 ms	Memory Usage: 115 MB	
8:02:51 PM: 2020-07-31T18:02:51.693Z	22106a33-1afd-4b83-996e-30466e9870bf	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:51 PM: Duration: 75.46 ms	Memory Usage: 115 MB	
8:02:52 PM: 2020-07-31T18:02:52.860Z	d07d03cc-1c91-4336-a6c2-94b09554f674	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:52 PM: Duration: 75.75 ms	Memory Usage: 115 MB	
8:02:53 PM: 2020-07-31T18:02:53.741Z	1b4f6024-1b5e-46b3-9e07-161ec75438d0	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:53 PM: Duration: 75.67 ms	Memory Usage: 115 MB	
8:02:54 PM: 2020-07-31T18:02:54.498Z	13555116-7bb5-4316-b1d8-c6f5eef5cf2c	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:54 PM: Duration: 75.60 ms	Memory Usage: 115 MB	
8:02:55 PM: 2020-07-31T18:02:55.285Z	67c21ccb-a909-49e8-ad76-5cb4e6053c02	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:55 PM: Duration: 76.11 ms	Memory Usage: 115 MB	
8:02:56 PM: 2020-07-31T18:02:56.153Z	a4039b57-2971-4193-baf1-e99123f790b3	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:56 PM: Duration: 75.27 ms	Memory Usage: 115 MB	
8:02:56 PM: 2020-07-31T18:02:56.986Z	746a497c-ee70-4262-aa12-a57eeb919f32	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:56 PM: Duration: 75.34 ms	Memory Usage: 115 MB	
8:02:57 PM: 2020-07-31T18:02:57.784Z	0725b718-fd9d-436f-9740-f013d2f60506	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:57 PM: Duration: 75.19 ms	Memory Usage: 115 MB	
8:02:58 PM: 2020-07-31T18:02:58.409Z	07fa83d8-65b1-4498-8afb-0827d35c3051	ERROR	prisma:query SELECT 1
8:02:58 PM: 2020-07-31T18:02:58.481Z	07fa83d8-65b1-4498-8afb-0827d35c3051	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:58 PM: Duration: 147.48 ms	Memory Usage: 115 MB	
8:02:59 PM: 2020-07-31T18:02:59.133Z	a2694ce7-52f9-4647-a4a9-f7d0efa61a96	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:59 PM: Duration: 75.35 ms	Memory Usage: 115 MB	
8:02:59 PM: 2020-07-31T18:02:59.861Z	20d2813b-5ec6-462f-9bd6-08600b284d10	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:02:59 PM: Duration: 75.59 ms	Memory Usage: 115 MB	
8:03:00 PM: 2020-07-31T18:03:00.628Z	096f06f2-b3ba-4d8c-bb45-2cb5a655b169	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:03:00 PM: Duration: 75.33 ms	Memory Usage: 115 MB	
8:03:01 PM: 2020-07-31T18:03:01.366Z	be33f621-f90d-4534-9a07-fe84c9e30c56	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:03:01 PM: Duration: 76.20 ms	Memory Usage: 115 MB	
8:03:02 PM: 2020-07-31T18:03:02.131Z	08825e71-5bc1-4e36-ae16-f3318226f7a5	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:03:02 PM: Duration: 75.61 ms	Memory Usage: 115 MB	
8:03:02 PM: 2020-07-31T18:03:02.846Z	f6176294-68f2-41d5-8615-bafc06069d29	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:03:02 PM: Duration: 75.91 ms	Memory Usage: 115 MB	
8:03:20 PM: 2020-07-31T18:03:20.607Z	a1ddcb61-695b-4721-ad25-012ef7cb3739	ERROR	prisma:query SELECT 1
8:03:20 PM: 2020-07-31T18:03:20.679Z	a1ddcb61-695b-4721-ad25-012ef7cb3739	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:03:20 PM: Duration: 147.66 ms	Memory Usage: 116 MB	
8:03:25 PM: 2020-07-31T18:03:25.436Z	ecb04b7b-c3ae-43cf-a466-1f9ecc845c06	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:03:25 PM: Duration: 75.94 ms	Memory Usage: 116 MB	
8:03:27 PM: 2020-07-31T18:03:27.222Z	1499d30b-5e62-4f86-8c61-55f6188a1fa8	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:03:27 PM: Duration: 75.34 ms	Memory Usage: 116 MB	
8:03:29 PM: 2020-07-31T18:03:29.930Z	87593cb5-dacb-4f3c-98f9-3659187f450f	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:03:29 PM: Duration: 75.82 ms	Memory Usage: 116 MB	
8:03:31 PM: 2020-07-31T18:03:31.099Z	d33c3bf6-e12a-4a98-9039-d2071cad4b71	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:03:31 PM: Duration: 75.59 ms	Memory Usage: 116 MB	
8:03:33 PM: 2020-07-31T18:03:33.020Z	c5509ccf-e7ea-45a6-b3f4-b79889b45ffc	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:03:33 PM: Duration: 75.52 ms	Memory Usage: 116 MB	
8:03:33 PM: 2020-07-31T18:03:33.948Z	a14df273-498c-43f3-a66c-d6661e19696e	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3
8:03:33 PM: Duration: 75.48 ms	Memory Usage: 116 MB	
8:03:34 PM: 2020-07-31T18:03:34.704Z	45079bc3-aa66-4a53-8f32-3b0f063208e8	ERROR	prisma:query SELECT "public"."Product"."id", "public"."Product"."name", "public"."Product"."desc", "public"."Product"."longDesc", "public"."Product"."price", "public"."Product"."imgUrl", "public"."Product"."createdAt", "public"."Product"."sku", "public"."Product"."productId" FROM "public"."Product" WHERE "public"."Product"."id" = $1 LIMIT $2 OFFSET $3

8:03:34 PM: Duration: 75.35 ms	Memory Usage: 116 MB	
8:05:14 PM: 2020-07-31T18:05:14.193Z	ff88914e-7839-46f4-a57a-15e3f999a844	
ERROR	PrismaClientUnknownRequestError: Invalid `prisma.product.findOne()` invocation in/var/task/src/api/dist/functions/prisma.js:15:42  
Unknown error in Prisma Client
This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic.https://github.com/prisma/prisma-client-js/issues/new?body=Hi+Prisma+Team%21+My+Prisma+Client+just+crashed.+This+is+the+report%3A%0A%23%23+Versions%0A%0A%7C+Name+++++%7C+Version++++++++++++%7C%0A%7C----------%7C--------------------%7C%0A%7C+Node+++++%7C+v12.18.2+++++++++++%7C+%0A%7C+OS+++++++%7C+rhel-openssl-1.0.x+%7C%0A%7C+Prisma+++%7C+2.2.2++++++++++++++%7C%0A%0A%23%23+Logs%0A%60%60%60%0Aprisma-client+Generated+request%3A%0A2020-07-31T18%3A02%3A56.079Z+prisma-client+query+%7B%0A++findOneProduct%28where%3A+%7B%0A++++id%3A+155%0A++%7D%29+%7B%0A++++id%0A++++name%0A++++desc%0A++++longDesc%0A++++price%0A++++imgUrl%0A++++createdAt%0A++++sku%0A++++productId%0A++%7D%0A%7D%0A%0A2020-07-31T18%3A02%3A56.913Z+prisma-client+Prisma+Client+call%3A%0A2020-07-31T18%3A02%3A56.913Z+prisma-client+prisma.product.findOne%28%7B%0A++where%3A+%7B%0A++++id%3A+155%0A++%7D%0A%7D%29%0A2020-07-31T18%3A02%3A56.913Z+prisma-client+Generated+request%3A%0A2020-07-31T18%3A02%3A56.913Z+prisma-client+query+%7B%0A++findOneProduct%28where%3A+%7B%0A++++id%3A+155%0A++%7D%29+%7B%0A++++id%0A++++name%0A++++desc%0A++++longDesc%0A++++price%0A++++imgUrl%0A++++createdAt%0A++++sku%0A++++productId
8:05:14 PM: Duration: 6.91 ms	Memory Usage: 116 MB	

Is there some sort of Prisma debug mode / setting?

This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic.
Please try again and set the environment variable `DEBUG=*` 

One more idea:

/redwood/packages/api/src/functions/graphql.ts

  /**
   * A callback when an unhandled exception occurs. Use this to disconnect your prisma instance.
   */
  onException?: () => void
}

Maybe use onException() to … something? :wink: It doesn’t seem to have access to the error, though.

 try {
      handler(event, context, callback)
    } catch (e) {
      onException && onException()
      // Disconnect from the database (recommended by Prisma), this step will be
      // removed in future releases.
      db && db.disconnect()
      throw e
    }

@Tobbe, might be a silly suggestion, but have you tried redoing a deploy after clearing the netlify build cache? If it seems like an upgrade issue mentioned by someone else above.

You do a manual deploy with “Trigger deploy” and then select “Clear cache and build” (or something to that effect).

This is how I reproduce it now. Tried it three times, and so far I’ve been able to trigger it every time

$ for i in {1..50}; do curl -s https://MY_SITE.netlify.app/.netlify/functions/prisma?id=155; done; sleep 90s && curl -s https://MY_SITE.netlify.app/.netlify/functions/prisma?id=15

Silly or not, I’m definitely going to try it! Thanks for the idea

1 Like

I can confirm I’m seeing this on 0.15.3 on our staging environment. Same error as you @Tobbe

{
  "errors": [
    {
      "message": "Context creation failed: Error: \nInvalid `prisma.user.findOne()` invocation in\n/var/task/src/api/dist/services/users/users.js:62:34\n\n\n  Started http server\n\nThis is a non-recoverable error which probably happens when the Prisma Query Engine has a panic.\n\nhttps://github.com/prisma/prisma-client-js/issues/new?body=Hi+Prisma+Team%21+My+Prisma+Client+just+crashed.+This+is+the+report%3A%0A%23%23+Versions%0A%0A%7C+Name+++++%7C+Version++++++++++++%7C%0A%7C----------%7C--------------------%7C%0A%7C+Node+++++%7C+v12.18.2+++++++++++%7C+%0A%7C+OS+++++++%7C+rhel-openssl-1.0.x+%7C%0A%7C+Prisma+++%7C+2.3.0++++++++++++++%7C%0A%0A%23+Description%0A%60%60%60%0AStarted+http+server%0A%60%60%60%0A%0A%23%23+Logs%0A%60%60%60%0A2020-08-04T15%3A31%3A43.154Z+prisma-client+%7B%0A++engineConfig%3A+%7B%0A++++cwd%3A+%27%2Fvar%2Ftask%2Fsrc%2Fnode_modules%2F.prisma%2Fclient%27%2C%0A++++enableDebugLogs%3A+false%2C%0A++++enableEngineDebugMode%3A+undefined%2C%0A++++datamodelPath%3A+%27%2Fvar%2Ftask%2Fsrc%2Fnode_modules%2F.prisma%2Fclient%2Fschema.prisma%27%2C%0A++++prismaPath%3A+undefined%2C%0A++++engineEndpoint%3A+undefined%2C%0A++++generator%3A+%7B%0A++++++name%3A+%27client%27%2C%0A++++++provider%3A+%27prisma-client-js%27%2C%0A++++++output%3A+%27%2Fopt%2Fbuild%2Frepo%2Fnode_modules%2F%40prisma%2Fclient%27%2C%0A++++++binaryTargets%3A+%5BArray%5D%2C%0A++++++previewFeatures%3A+%5BArray%5D%2C%0A++++++config%3A+%7B%7D%0A++++%7D%2C%0A++++showColors%3A+false%2C%0A++++logLevel%3A+undefined%2C%0A++++logQueries%3A+undefined%2C%0A++++flags%3A+%5B%5D%2C%0A++++clientVersion%3A+%272.3.0%27%2C%0A++++enableExperimental%3A+%5B+%27aggregations%27+%5D%0A++%7D%0A%7D%0A2020-08-04T15%3A31%3A43.809Z+plusX+Execution+permissions+of+%2Fvar%2Ftask%2Fsrc%2Fnode_modules%2F.prisma%2Fclient%2Fquery-engine-rhel-openssl-1.0.x+are+fine%0A2020-08-04T15%3A31%3A44.109Z+prisma-client+Client+Version+2.3.0%0A2020-08-04T15%3A31%3A44.109Z+prisma-client+Engine+Version+e11114fa1ea826f9e7b4fa1ced34e78892fe8e0e%0A%60%60%60&title=Started+http+server&template=bug_report.md\n\nIf you want the Prisma team to look into it, please open the link above 🙏\n",
      "extensions": {
        "code": "UNAUTHENTICATED",
        "exception": {
          "stacktrace": [
            "AuthenticationError: Context creation failed: Error: ",
            "Invalid `prisma.user.findOne()` invocation in",
            "/var/task/src/api/dist/services/users/users.js:62:34",
            "",
            "",
            "  Started http server",
            "",
            "This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic.",
            "",
            "https://github.com/prisma/prisma-client-js/issues/new?body=Hi+Prisma+Team%21+My+Prisma+Client+just+crashed.+This+is+the+report%3A%0A%23%23+Versions%0A%0A%7C+Name+++++%7C+Version++++++++++++%7C%0A%7C----------%7C--------------------%7C%0A%7C+Node+++++%7C+v12.18.2+++++++++++%7C+%0A%7C+OS+++++++%7C+rhel-openssl-1.0.x+%7C%0A%7C+Prisma+++%7C+2.3.0++++++++++++++%7C%0A%0A%23+Description%0A%60%60%60%0AStarted+http+server%0A%60%60%60%0A%0A%23%23+Logs%0A%60%60%60%0A2020-08-04T15%3A31%3A43.154Z+prisma-client+%7B%0A++engineConfig%3A+%7B%0A++++cwd%3A+%27%2Fvar%2Ftask%2Fsrc%2Fnode_modules%2F.prisma%2Fclient%27%2C%0A++++enableDebugLogs%3A+false%2C%0A++++enableEngineDebugMode%3A+undefined%2C%0A++++datamodelPath%3A+%27%2Fvar%2Ftask%2Fsrc%2Fnode_modules%2F.prisma%2Fclient%2Fschema.prisma%27%2C%0A++++prismaPath%3A+undefined%2C%0A++++engineEndpoint%3A+undefined%2C%0A++++generator%3A+%7B%0A++++++name%3A+%27client%27%2C%0A++++++provider%3A+%27prisma-client-js%27%2C%0A++++++output%3A+%27%2Fopt%2Fbuild%2Frepo%2Fnode_modules%2F%40prisma%2Fclient%27%2C%0A++++++binaryTargets%3A+%5BArray%5D%2C%0A++++++previewFeatures%3A+%5BArray%5D%2C%0A++++++config%3A+%7B%7D%0A++++%7D%2C%0A++++showColors%3A+false%2C%0A++++logLevel%3A+undefined%2C%0A++++logQueries%3A+undefined%2C%0A++++flags%3A+%5B%5D%2C%0A++++clientVersion%3A+%272.3.0%27%2C%0A++++enableExperimental%3A+%5B+%27aggregations%27+%5D%0A++%7D%0A%7D%0A2020-08-04T15%3A31%3A43.809Z+plusX+Execution+permissions+of+%2Fvar%2Ftask%2Fsrc%2Fnode_modules%2F.prisma%2Fclient%2Fquery-engine-rhel-openssl-1.0.x+are+fine%0A2020-08-04T15%3A31%3A44.109Z+prisma-client+Client+Version+2.3.0%0A2020-08-04T15%3A31%3A44.109Z+prisma-client+Engine+Version+e11114fa1ea826f9e7b4fa1ced34e78892fe8e0e%0A%60%60%60&title=Started+http+server&template=bug_report.md",
            "",
            "If you want the Prisma team to look into it, please open the link above 🙏",
            "",
            "    at getCurrentUser (/var/task/src/api/dist/lib/auth.js:53:15)"
          ]
        }
      }
    }
  ]
}

Time to call in the big guns! @peterp, @thedavid - potential release issue.

Happy to help - just point us in the right direction :slight_smile:. I have a script (with my access token, so can’t post here) to reproduce

2 Likes