.transaction([]) fails with Request Timeout Error
See original GitHub issueBug description
Using the new .transaction([])
, I am seeing this on the client (JavaScript):
{ Error: Request Timeout Error
at PrismaClientFetcher._request (/app/node_modules/@prisma/client/runtime/index.js:1:213208) code: 'UND_ERR_REQUEST_TIMEOUT', meta: undefined }
How to reproduce
Add multiple child records to an existing parent record.
const requests = [];
// loop that creates around 30 different requests, each with perhaps 500 to 1000 and puts them in the array like this:
requests.push(prisma.{entity}.update({
where: { id: {id that exists}},
data: {
{related entity name}: {
create: [
{ between 500 and 1000 individual entities },
]
},
})
await prisma.transaction(requests);
Expected behavior
Should complete without throwing the exception.
Prisma information
Sorry, I can not share this information. But, I can tell you it’s just doing basic inserts.
Environment & setup
- OS: macOS 10.15.5
- Database: MySQL 5.7.x
- Prisma version: 2.2.0
- Node.js version: v14.5.0
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:19 (7 by maintainers)
Top Results From Across the Web
Timeout error when result of a transaction is used as parameter
In your case, the call to the method GetLogs is executed while the transaction is still running, and that method searches for the...
Read more >408 Request Timeout: What It Is and How to Fix It - Airbrake Blog
The 408 Request Timeout is an HTTP response status code indicating that the server did not receive a complete request from the client...
Read more >Maximum execution time exceeded error while making an ...
To fix this issue, we would need to adjust the “Maximum Duration (seconds)” of the Transaction Quota Rules related to the type of...
Read more >Receiving "The request timed out." when using NSURLSession
I'm facing a very strange problem in my application. In particular, using the application when a request receives a timeout message, all the...
Read more >Timeout expired messages when connecting to SQL Server
Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgment. This could be because ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
FYI: 2.5.0 has been released.
@janpio I’ve opened an issue #3892