On Wed, Dec 10, 2014 at 6:35 AM, Ashley Finney <[email protected]> wrote:
>
> I'm currently hitting the instance soft memory limit of 256MB by doing
> this...
>
> q := datastore.NewQuery("MetaPLBStruct").Limit(500)
>
> So, what am I doing wrong?
>



This issue has come up before on the google-appengine-go forum; for
instance, see this thread:
https://groups.google.com/d/msg/google-appengine-go/nB4X5AZlmKQ/K5C2C00NKpoJ
. You may find it helpful to cross-post your question there (and there is a
discussion on profiling as well).

With that said, if your intention is to iterate through "much greater than
500" entities you may want to process your entities through a MapReduce
approach, or use cursors
<https://cloud.google.com/appengine/docs/go/datastore/reference#Cursor> and
only process a batch of entities at one time.


On Wed, Dec 10, 2014 at 6:35 AM, Ashley Finney <[email protected]> wrote:
>
> I see python has some kind of batch size that is missing from Go, would
> this help?
>


Batches are available; use the Limit function to declare a batch size, then
cursors can move you between one batch to the next.


-----------------
-Vinny P
Technology & Media Consultant
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Reply via email to