Search code examples
google-app-enginegoogle-cloud-datastoreobjectify

com.google.cloud.datastore.DatastoreException: Failed retrying datastore 200 times


I was doing a stress test of running an endpoint multiple times in a short period of time. The endpoint updates the same entity in a transaction. Eventually, I got this error:

com.google.cloud.datastore.DatastoreException: Failed retrying datastore 200 times

I tried it with both transact() and transactNew() in objectify and got this error. The objectify comments specifically say that transactNew() retries the transaction Integer.MAX_VALUE times so I don't understand why I got this error at only 200 retries.

Does anyone know if this error is an objectify error or a Datastore error?

Is there a Datastore transactional limit of 200? Or is something else going on like App Engine not auto-scaling right?


Solution

  • The default limit in Objectify is 200