Skip to content

ConnectionError(Timed out during query execution.) error when using Promise.all for SQLite #11789

@kyuhakyuk

Description

@kyuhakyuk

Bug description

Just like the title explains,, when I use Promise.all to delete (in my case), it throws timed out error.

Never had the same issue with other db such as postgres and mysql. But for sqlite, i am getting this issue.

Is there any workaround or legit solution that I am not aware of for this error?

How to reproduce

model Category {
  id                          String                      @id @default(cuid())
  description                 String?
  name                        String                      @unique
  slug                        String                      @unique
  // *************** RELATIONS *****************
  subcategories               Category[]                  @relation("SuperCategoriesSubCategories", references: [id])
  supercategories             Category[]                  @relation("SuperCategoriesSubCategories", references: [id])
  // *******************************************
  createdAt                   DateTime                    @default(now())
  updatedAt                   DateTime                    @default(now())
  deletedAt                   DateTime?
}
// For front
Promise.all([
  ...send multiple delete request
])
// For backend
prisma.category.delete({
      where: {
        id,
      }
})

Expected behavior

Delete all passed categories

Prisma information

Environment & setup

  • OS:
  • Database:
  • Node.js version:

Prisma Version

3.9.2

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions