question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.transaction([]) fails with Request Timeout Error

See original GitHub issue

Bug 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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
janpiocommented, Aug 18, 2020

FYI: 2.5.0 has been released.

2reactions
durdenxcommented, Oct 12, 2020

@janpio I’ve opened an issue #3892

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found