Jeremias Santos
Jeremias Santos

Reputation: 377

Google App Engine - Datastore java.lang.IllegalArgumentException: entity is too big

When I try to save an entity, the Datastore throws the error:

java.lang.IllegalArgumentException: entity is too big
    at com.google.appengine.api.datastore.DatastoreApiHelper.translateError(DatastoreApiHelper.java:53)
....

Upvotes: 1

Views: 878

Answers (2)

rmrf
rmrf

Reputation: 133

Currently, each unindexed String property can be up to 1MB, and total entity size 1MB. The "Limits" doc in the comment on OP was updated to use this value.

Entity groups can be a solution here.

Upvotes: 1

Ying Li
Ying Li

Reputation: 2519

There's limitation to Google Datastore. The official recommendation is to split up your large entity into a logical Entity group with ancestors and their children defined.

Think of it like nested records. If you create an entity called "Employees", you can create children entities like "Performance" and "Profile". This way you don't need that employee's entire history and profile in one entity.

Basically, you can design your datastore structure to ensure each individual entity do not exceed 1MB in size.

Upvotes: 2

Related Questions