Hi Waleed, You have several options: - Attempt to estimate the size of the entities you're creating by summing up the size of the fields and adding some overhead, then splitting by size. - Count the actual size of each entity by using model_to_proto. High overhead. - Use a 'divide and conquer' approach, catching RequestTooLargeError exceptions and splitting the operation in half.
-Nick Johnson On Sat, Apr 10, 2010 at 11:59 PM, Waleed Abdulla <[email protected]> wrote: > I pull feeds and save their articles into the datastore. I parse the feed > and create "post" objects and then save them all in one call as such: > > db.put(posts) > > However, sometimes I get a RequestTooLargeError exception. What's the best > way to handle it, knowing that sometimes a feed has a few number of posts > but they are very big ones, and sometimes it's a big number of small posts. > Is there an easy way to figure out what big each instance is so I can > calculate the total size before saving and chunk them accordingly? > > Waleed > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
