In general, a rule of thumb is to engineer your application for 1 write a
second to an entity group. If you are doing 2-5 writes a second to a single
entity, you *should* be okay, however, I would just as easily understand if
you are not. If you need to do "counters", the sharded counter pattern
should be used.

Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine



On Thu, Jun 23, 2011 at 5:03 PM, mscwd01 <mscw...@gmail.com> wrote:

> Yes each time a user makes a request to the app, their user entity is
> loaded and their request count incremented, so the "User" entity is
> fetched, updated and "put" very frequently.
> Surely though the datastore should be able to handle this, it's not
> like I'm making thousand of requests per second, more like 2-5.
>
> Also would this explain why the app was running fine for days and then
> for a 5 hour period yesterday started throwing errors, only to
> "correct" itself and work fine ever since?
>
> Maybe a Googler could look into my specific app for me and let me know
> what's going wrong because this is perplexing me! I'll email you the
> app id if possible.
>
> Thanks
>
> On Jun 23, 5:14 am, Didier Durand <durand.did...@gmail.com> wrote:
> > Hi,
> >
> > Don't you have some datastore entities that are used in every request
> > or so? Let's say a global counter of requests or sthg equivalent.
> >
> > That entity would be updated in every request, hence the contentions
> > as you trafic raises.
> >
> > regards
> >
> > ddoer
> >
> > On Jun 22, 11:59 pm, mscwd01 <mscw...@gmail.com> wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Okay I just got a single log entry pop up that may offer some insight
> > > to the problem. It reads:
> >
> > > Too much contention on these datastore entities. please try again.
> >
> > > I have noticed a slight increase to the number of requests received
> > > today (so far 40k), could it be some unforeseen issue that occurs only
> > > when I get a spike in traffic?
> >
> > > On Jun 22, 10:52 pm, mscwd01 <mscw...@gmail.com> wrote:
> >
> > > > Hey
> >
> > > > I just noticed my app stopped working correctly so I opened the logs
> > > > and went back as far as I could (about an hour) and I noticed my app
> > > > wasn't able to load a specific kind of entity. Going by my current
> CPU
> > > > usage it seems like the issue has been ongoing for several hours.
> >
> > > > Whilst trying to think of a solution to the problem (and trying to
> > > > fathom why the problem would arise not having modified the app at
> > > > all), I rechecked the logs and found the app had fixed itself and the
> > > > specific entity kind was successfully being loaded.
> >
> > > > I have three kinds of entity used by my app and two out of three
> > > > loaded fine.
> >
> > > > Has anyone else seen this happen to their apps? It's rather
> > > > disconcerting not knowing why a problem arises and then magically
> > > > fixes itself!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to