Error with Prisma

Is it normal the execution time takes awhile because i ran into this issue
This request could not be understood by the server:
{"type":"UnknownJsonError","body":{"code":"P6004","message":"The Query did not produce a result
within the maximum allowed execution time of 10 seconds. This limit is configurable, see
pris.ly/configure-limits for more information."}} (The request id was: jsackcasca)
This request could not be understood by the server:
{"type":"UnknownJsonError","body":{"code":"P6004","message":"The Query did not produce a result
within the maximum allowed execution time of 10 seconds. This limit is configurable, see
pris.ly/configure-limits for more information."}} (The request id was: jsackcasca)
5 Replies
bekacru
bekacru12mo ago
what caused this? and no it shouldn't
Faris
FarisOP12mo ago
generator client {
provider = "prisma-client-js"
engineType = "library"
}

datasource db {
provider = "mongodb"
url = env("DIRECT_URL")
// directUrl = env("DIRECT_URL")
}

model User {
id String @id @default(auto()) @map("_id") @db.ObjectId
name String
email String
emailVerified Boolean
image String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
Session Session[]
Account Account[]

@@map("user")
}

model Session {
id String @id @default(auto()) @map("_id") @db.ObjectId
user User @relation(fields: [userId], references: [id])
userId String @db.ObjectId // relation scalar field (used in the `@relation` attribute above)
expiresAt DateTime @default(now())
ipAddress String?
userAgent String?

@@map("session")
}

model Account {
id String @id @default(auto()) @map("_id") @db.ObjectId
user User @relation(fields: [userId], references: [id])
userId String @db.ObjectId // relation scalar field (used in the `@relation` attribute above)
accountId String
providerId String
accessToken String?
refreshToken String?
expiresAt DateTime?
password String?

@@map("account")
}

model Verification {
id String @id @default(auto()) @map("_id") @db.ObjectId
identifier String
value String
expiresAt DateTime

@@map("verification")
}
generator client {
provider = "prisma-client-js"
engineType = "library"
}

datasource db {
provider = "mongodb"
url = env("DIRECT_URL")
// directUrl = env("DIRECT_URL")
}

model User {
id String @id @default(auto()) @map("_id") @db.ObjectId
name String
email String
emailVerified Boolean
image String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
Session Session[]
Account Account[]

@@map("user")
}

model Session {
id String @id @default(auto()) @map("_id") @db.ObjectId
user User @relation(fields: [userId], references: [id])
userId String @db.ObjectId // relation scalar field (used in the `@relation` attribute above)
expiresAt DateTime @default(now())
ipAddress String?
userAgent String?

@@map("session")
}

model Account {
id String @id @default(auto()) @map("_id") @db.ObjectId
user User @relation(fields: [userId], references: [id])
userId String @db.ObjectId // relation scalar field (used in the `@relation` attribute above)
accountId String
providerId String
accessToken String?
refreshToken String?
expiresAt DateTime?
password String?

@@map("account")
}

model Verification {
id String @id @default(auto()) @map("_id") @db.ObjectId
identifier String
value String
expiresAt DateTime

@@map("verification")
}
just using prisma with accelerate and without
const user = await auth.api.signUpEmail({body: {
email: 'test@gmail.com',
password: 'Test',
name: 'Test Name'
}})
const user = await auth.api.signUpEmail({body: {
email: 'test@gmail.com',
password: 'Test',
name: 'Test Name'
}})
this is my signup function
bekacru
bekacru12mo ago
so when accelrate is on, it shows the error?
Faris
FarisOP12mo ago
yeah. i need accelerate because if not ill get Error validating datasource db: the URL must start with the protocol prisma:// error not sure if it helps but im in Malaysia and my database is located in US West (Oregon)
bekacru
bekacru12mo ago
A 10-second query time is way too high. Make sure you're using the latest version, and if the issue persists, open a GitHub issue.

Did you find this page helpful?