How to minimalize `Transaction is too old`


is it possible to minimalize this kind of error - Transaction is too old?

I do several concurrent transaction with JavaScript client. (parallel = 10).
I can handle it and repeat request, but I’m curious and want to improve performance.

If it is possible, how to do it?

are u using commit or commit now?

I use only commit like in JS doc

I found this option in code. It little help, but I still get this errors.

Why and when transaction is old?

Well, if you’re doing like in the documentation. I have no idea what it is. But maybe it can be the clock? Are your instances in sync?

Right now, I’m testing on cluster with one zero and one server which runs in AWS eu-west-1 zone. My PC time is sync according to NTP server.

Are you seeing them once in a while, and on a repeat they go away, or they just continue to happen indefinitely? When mutations are happening, and we discard older versions, then if a txn tries to read the older version, we tell it to retry. That’s what’s happening here.

Hmm, ok it is reasonable.

I would like to use dGraph with AWS Lambda.
During my test I got another error: Error: 13 INTERNAL: GOAWAY received.
Is there any limit on how many clients can connect or what this error mean?

This can be related to

Is a gRPC thing.


Sent by servers to clients to indicate that they will no longer accept any new streams on the associated connections. This frame includes the id of the last successfully accepted stream by the server. Clients should consider any stream initiated after the last successfully accepted stream as UNAVAILABLE and retry the call elsewhere. Clients are free to continue working with the already accepted streams until they complete or the connection is terminated.

Servers should send GOAWAY before terminating a connection to reliably inform clients which work has been accepted by the server and is being executed.

There’s other option for JS.