Hi Takashi, Thanks for the prompt response. Info below...
On Tuesday, July 31, 2012 8:30:58 PM UTC-7, Takashi Matsuo (Google) wrote: > > Hi Kristopher, > > Where are you accessing your app from? Ping result is just for our > frontend facilities, so it doesn't reflect the real network latency of > your app. > I'm physically in Palo Alto, CA. Do you need more detail than that? I can run a traceroute if that helps. > > > > Looking further, I discovered that Google App Engine is spawning new > > instances of my app at a pathological rate. For example, I left the app > > stats console open for a while, and found that just loading the appstats > URI > > by itself would cause a new instance to spawn! This is with zero QPS > > otherwise - my app was completely idle, and none of my own code was > running > > at all. > > Sorry if I miss something, but I think it's the expected behavior. If > you don't set min idle instances, your app doesn't need to have any > instances with zero QPS, right? So if there's a new request, App > Engine spins up a new instance for your application. > Right, sorry, this part was not very clear. In this particular case, I had min (and max) instances set to 1. So there was (should have been) an instance already running, and from the logs it was idle. I can set this case up again if you like and gather more details. I think the cause of the high latency is the user facing loading requests. > > Can you try something like min idle instances=5(or 10)/max idle > instances=automatic, and see how it goes first? Currently setting 'min > idle instances' is the most reliable way to reduce user facing loading > requests. Additionally, you shouldn't set 'max idle instances' because > if you set max idle instances, App Engine will terminate your idle > instances aggressively, as a result you will see more user facing > loading requests. > I can try that. That was actually the point of bumping up the min instances to 2 (whereas previously it was 1). The fact that five instances were spawned is baffling to me because there really weren't that many requests - from the logs, it looks to me as if GAE spawned three new instances after receiving the very first request, despite there being two idle instances ready to handle it. I'm wondering if I would have better luck with a backend for this. This is an Ajax application where the HTML is locally embedded in an iOS app, so there's really no frontend in the traditional sense. - Kris -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/1u6A2_1Iz9cJ. 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.
