[GH-ISSUE #5735] [bug]: Importing large number of Postman collections causes "A batch query cannot be executed on an expired transaction" #2241

Open
opened 2026-03-16 23:41:44 +03:00 by kerem · 1 comment
Owner

Originally created by @komapa on GitHub (Dec 28, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5735

Originally assigned to: @mirarifhasan on GitHub.

Is there an existing issue for this?

  • I have searched existing issues and this bug hasn't been reported yet

Platform

Web App

Browser

Chrome

Operating System

macOS

Bug Description

It is unclear to me if I can increase this 10000ms:

Backend Server | Error from TeamCollectionService.importCollectionsFromJSON ConflictException: 
Backend Server | Invalid `tx.teamCollection.create()` invocation in
Backend Server | /dist/backend/dist/src/team-collection/team-collection.service.js:177:81
Backend Server | 
Backend Server |   174 });
Backend Server |   175 let lastOrderIndex = lastEntry ? lastEntry.orderIndex : 0;
Backend Server |   176 queryList = collectionsList.right.map((x) => this.generatePrismaQueryObjForFBCollFolder(x, teamID, ++lastOrderIndex));
Backend Server | → 177 const promises = queryList.map((query) => tx.teamCollection.create(
Backend Server | Transaction API error: A batch query cannot be executed on an expired transaction. The timeout for this transaction was 10000 ms, however 18297 ms passed since the start of the transaction. Consider increasing the interactive transaction timeout or doing less work in the transaction.
Backend Server |     at /dist/backend/dist/src/team-collection/team-collection.service.js:186:27
Backend Server |     at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
Backend Server |     at async Proxy._transactionWithCallback (/dist/backend/node_modules/.pnpm/@prisma+client@7.2.0_prisma@7.2.0_@types+react@19.2.6_react-dom@19.2.0_react@19.2.0__re_6270a76b5a469f2a05996ebd70951ecb/node_modules/@prisma/client/runtime/client.js:75:4390)
Backend Server |     at async TeamCollectionService.importCollectionsFromJSON (/dist/backend/dist/src/team-collection/team-collection.service.js:167:13)
Backend Server |     at async TeamCollectionResolver.importCollectionsFromJSON (/dist/backend/dist/src/team-collection/team-collection.resolver.js:119:36) {
Backend Server |   response: PrismaClientKnownRequestError: 
Backend Server |   Invalid `tx.teamCollection.create()` invocation in
Backend Server |   /dist/backend/dist/src/team-collection/team-collection.service.js:177:81
Backend Server |   
Backend Server |     174 });
Backend Server |     175 let lastOrderIndex = lastEntry ? lastEntry.orderIndex : 0;
Backend Server |     176 queryList = collectionsList.right.map((x) => this.generatePrismaQueryObjForFBCollFolder(x, teamID, ++lastOrderIndex));
Backend Server |   → 177 const promises = queryList.map((query) => tx.teamCollection.create(
Backend Server |   Transaction API error: A batch query cannot be executed on an expired transaction. The timeout for this transaction was 10000 ms, however 18297 ms passed since the start of the transaction. Consider increasing the interactive transaction timeout or doing less work in the transaction.
Backend Server |       at qr.handleRequestError (/dist/backend/node_modules/.pnpm/@prisma+client@7.2.0_prisma@7.2.0_@types+react@19.2.6_react-dom@19.2.0_react@19.2.0__re_6270a76b5a469f2a05996ebd70951ecb/node_modules/@prisma/client/runtime/client.js:65:8172)
Backend Server |       at qr.handleAndLogRequestError (/dist/backend/node_modules/.pnpm/@prisma+client@7.2.0_prisma@7.2.0_@types+react@19.2.6_react-dom@19.2.0_react@19.2.0__re_6270a76b5a469f2a05996ebd70951ecb/node_modules/@prisma/client/runtime/client.js:65:7467)
Backend Server |       at qr.request (/dist/backend/node_modules/.pnpm/@prisma+client@7.2.0_prisma@7.2.0_@types+react@19.2.6_react-dom@19.2.0_react@19.2.0__re_6270a76b5a469f2a05996ebd70951ecb/node_modules/@prisma/client/runtime/client.js:65:7174)
Backend Server |       at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
Backend Server |       at async a (/dist/backend/node_modules/.pnpm/@prisma+client@7.2.0_prisma@7.2.0_@types+react@19.2.6_react-dom@19.2.0_react@19.2.0__re_6270a76b5a469f2a05996ebd70951ecb/node_modules/@prisma/client/runtime/client.js:75:5816)
Backend Server |       at async Promise.all (index 1)
Backend Server |       at async /dist/backend/dist/src/team-collection/team-collection.service.js:183:39
Backend Server |       at async Proxy._transactionWithCallback (/dist/backend/node_modules/.pnpm/@prisma+client@7.2.0_prisma@7.2.0_@types+react@19.2.6_react-dom@19.2.0_react@19.2.0__re_6270a76b5a469f2a05996ebd70951ecb/node_modules/@prisma/client/runtime/client.js:75:4390)
Backend Server |       at async TeamCollectionService.importCollectionsFromJSON (/dist/backend/dist/src/team-collection/team-collection.service.js:167:13)
Backend Server |       at async TeamCollectionResolver.importCollectionsFromJSON (/dist/backend/dist/src/team-collection/team-collection.resolver.js:119:36) {
Backend Server |     code: 'P2028',
Backend Server |     meta: {
Backend Server |       modelName: 'TeamCollection',
Backend Server |       operation: 'batch query',
Backend Server |       timeout: 10000,
Backend Server |       timeTaken: 18297
Backend Server |     },
Backend Server |     clientVersion: '7.2.0'
Backend Server |   },
Backend Server |   status: 409,
Backend Server |   options: {}
Backend Server | }
Backend Server | [Nest[] 47  - 12/28/2025, 7:54:01 PM   ERROR [ExceptionsHandler] Error: team_coll/creation_failed
Backend Server |     at throwErr (/dist/backend/dist/src/utils.js:68:11)
Backend Server |     at TeamCollectionResolver.importCollectionsFromJSON (/dist/backend/dist/src/team-collection/team-collection.resolver.js:121:34)
Backend Server |     at process.processTicksAndRejections (node:internal/process/task_queues:103:5)

Deployment Type

Self-hosted (on-prem deployment)

Version

2025.12.0

Originally created by @komapa on GitHub (Dec 28, 2025). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5735 Originally assigned to: @mirarifhasan on GitHub. ### Is there an existing issue for this? - [x] I have searched existing issues and this bug hasn't been reported yet ### Platform Web App ### Browser Chrome ### Operating System macOS ### Bug Description It is unclear to me if I can increase this 10000ms: ``` Backend Server | Error from TeamCollectionService.importCollectionsFromJSON ConflictException: Backend Server | Invalid `tx.teamCollection.create()` invocation in Backend Server | /dist/backend/dist/src/team-collection/team-collection.service.js:177:81 Backend Server | Backend Server | 174 }); Backend Server | 175 let lastOrderIndex = lastEntry ? lastEntry.orderIndex : 0; Backend Server | 176 queryList = collectionsList.right.map((x) => this.generatePrismaQueryObjForFBCollFolder(x, teamID, ++lastOrderIndex)); Backend Server | → 177 const promises = queryList.map((query) => tx.teamCollection.create( Backend Server | Transaction API error: A batch query cannot be executed on an expired transaction. The timeout for this transaction was 10000 ms, however 18297 ms passed since the start of the transaction. Consider increasing the interactive transaction timeout or doing less work in the transaction. Backend Server | at /dist/backend/dist/src/team-collection/team-collection.service.js:186:27 Backend Server | at process.processTicksAndRejections (node:internal/process/task_queues:103:5) Backend Server | at async Proxy._transactionWithCallback (/dist/backend/node_modules/.pnpm/@prisma+client@7.2.0_prisma@7.2.0_@types+react@19.2.6_react-dom@19.2.0_react@19.2.0__re_6270a76b5a469f2a05996ebd70951ecb/node_modules/@prisma/client/runtime/client.js:75:4390) Backend Server | at async TeamCollectionService.importCollectionsFromJSON (/dist/backend/dist/src/team-collection/team-collection.service.js:167:13) Backend Server | at async TeamCollectionResolver.importCollectionsFromJSON (/dist/backend/dist/src/team-collection/team-collection.resolver.js:119:36) { Backend Server | response: PrismaClientKnownRequestError: Backend Server | Invalid `tx.teamCollection.create()` invocation in Backend Server | /dist/backend/dist/src/team-collection/team-collection.service.js:177:81 Backend Server | Backend Server | 174 }); Backend Server | 175 let lastOrderIndex = lastEntry ? lastEntry.orderIndex : 0; Backend Server | 176 queryList = collectionsList.right.map((x) => this.generatePrismaQueryObjForFBCollFolder(x, teamID, ++lastOrderIndex)); Backend Server | → 177 const promises = queryList.map((query) => tx.teamCollection.create( Backend Server | Transaction API error: A batch query cannot be executed on an expired transaction. The timeout for this transaction was 10000 ms, however 18297 ms passed since the start of the transaction. Consider increasing the interactive transaction timeout or doing less work in the transaction. Backend Server | at qr.handleRequestError (/dist/backend/node_modules/.pnpm/@prisma+client@7.2.0_prisma@7.2.0_@types+react@19.2.6_react-dom@19.2.0_react@19.2.0__re_6270a76b5a469f2a05996ebd70951ecb/node_modules/@prisma/client/runtime/client.js:65:8172) Backend Server | at qr.handleAndLogRequestError (/dist/backend/node_modules/.pnpm/@prisma+client@7.2.0_prisma@7.2.0_@types+react@19.2.6_react-dom@19.2.0_react@19.2.0__re_6270a76b5a469f2a05996ebd70951ecb/node_modules/@prisma/client/runtime/client.js:65:7467) Backend Server | at qr.request (/dist/backend/node_modules/.pnpm/@prisma+client@7.2.0_prisma@7.2.0_@types+react@19.2.6_react-dom@19.2.0_react@19.2.0__re_6270a76b5a469f2a05996ebd70951ecb/node_modules/@prisma/client/runtime/client.js:65:7174) Backend Server | at process.processTicksAndRejections (node:internal/process/task_queues:103:5) Backend Server | at async a (/dist/backend/node_modules/.pnpm/@prisma+client@7.2.0_prisma@7.2.0_@types+react@19.2.6_react-dom@19.2.0_react@19.2.0__re_6270a76b5a469f2a05996ebd70951ecb/node_modules/@prisma/client/runtime/client.js:75:5816) Backend Server | at async Promise.all (index 1) Backend Server | at async /dist/backend/dist/src/team-collection/team-collection.service.js:183:39 Backend Server | at async Proxy._transactionWithCallback (/dist/backend/node_modules/.pnpm/@prisma+client@7.2.0_prisma@7.2.0_@types+react@19.2.6_react-dom@19.2.0_react@19.2.0__re_6270a76b5a469f2a05996ebd70951ecb/node_modules/@prisma/client/runtime/client.js:75:4390) Backend Server | at async TeamCollectionService.importCollectionsFromJSON (/dist/backend/dist/src/team-collection/team-collection.service.js:167:13) Backend Server | at async TeamCollectionResolver.importCollectionsFromJSON (/dist/backend/dist/src/team-collection/team-collection.resolver.js:119:36) { Backend Server | code: 'P2028', Backend Server | meta: { Backend Server | modelName: 'TeamCollection', Backend Server | operation: 'batch query', Backend Server | timeout: 10000, Backend Server | timeTaken: 18297 Backend Server | }, Backend Server | clientVersion: '7.2.0' Backend Server | }, Backend Server | status: 409, Backend Server | options: {} Backend Server | } Backend Server | [Nest[] 47 - 12/28/2025, 7:54:01 PM ERROR [ExceptionsHandler] Error: team_coll/creation_failed Backend Server | at throwErr (/dist/backend/dist/src/utils.js:68:11) Backend Server | at TeamCollectionResolver.importCollectionsFromJSON (/dist/backend/dist/src/team-collection/team-collection.resolver.js:121:34) Backend Server | at process.processTicksAndRejections (node:internal/process/task_queues:103:5) ``` ### Deployment Type Self-hosted (on-prem deployment) ### Version 2025.12.0
Author
Owner

@komapa commented on GitHub (Dec 29, 2025):

And also it makes it look like stuff got imported:

Image
<!-- gh-comment-id:3697494621 --> @komapa commented on GitHub (Dec 29, 2025): And also it makes it look like stuff got imported: <img width="503" height="974" alt="Image" src="https://github.com/user-attachments/assets/b80b74bd-7eee-4aae-8ac8-a620af8b3176" />
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#2241
No description provided.