I just realized I sent this to the wrong (java-specific, deprecated) Google Group. For those of you on both the google-appengine list and this one, I apologize in advance for the duplicate thread I'm about to start :-(
Jeff On Tue, Feb 28, 2012 at 12:25 PM, Jeff Schnitzer <j...@infohazard.org>wrote: > Thanks for the link. This doesn't directly address the main point I'm > worried about though: > > * Why does any user-facing request ever sit in the pending queue for an > instance that is warming-up when there is a perfectly good instance sitting > there? > > My problem is not that GAE is spinning up new instances. My problem is > that users are waiting for it. There's an instance sitting there with a > low wait time in the pending queue - why is GAE shunting new requests to > instances with an effective 10-20s wait time instead? > > Jeff > > On Tue, Feb 28, 2012 at 12:00 PM, Francois Masurel <f.masu...@gmail.com>wrote: > >> Hi Jeff, >> >> Check this post : >> https://groups.google.com/forum/#!msg/google-appengine/3t5muVhXajg/SSFU-udjIhwJ >> >> >> Setting "Idle instances" to automatic, as Johan Euphrosine suggested, >> seems to have solved the problem, at least temporarily (I was at 1 minimum >> and 1 maximum before). >> >> I'm just a bit scared now to get over my daily quotas. >> >> François >> >> >> On Tuesday, February 28, 2012 5:34:36 PM UTC+1, Jeff Schnitzer wrote: >>> >>> There's been a lot of discussion of the scheduler behavior in >>> Pythonland, but not much about it's "eccentricities" in Javaland. >>> >>> I have a threadsafe=true Java app. Let's say every request completes in >>> exactly 1s. Settings are: idle instances min 1 max 1, latency auto/auto. >>> Here is what I expect: >>> >>> * Instance1 starts up and becomes permanently resident >>> * Instance1 serves concurrent requests up to some arbitrary CPU capcity >>> * When Instance1 exceeds capacity: >>> * Instance2 starts warming up >>> * All requests remain in the pending queue for Instance1, getting >>> processed at 1/s * concurrency >>> * Instance2 is ready and starts processing new requests, sharing >>> the load with Instance1 >>> >>> What I actually see (as far as I can determine): >>> >>> * Instance1 starts up and becomes permanently resident >>> * Instance1 supports almost no concurrency. At most it's 2. (no, my >>> app is not particularly compute intensive) >>> * A new request comes in which for some reason can't be handled by >>> Instance1: >>> * Instance2 starts warming up >>> * The new request is blocked on Instance2's pending queue, waiting >>> 10-20s for Instance2 to be ready >>> * In the mean time, Instance1 is actually idle >>> * Another new request comes in and starts up Instance3 >>> * Possibly this is while Instance2 is warming up >>> * AFAICT, Instance1 is taking a coffee break >>> >>> The net result is that I have an idle website with 1 user (me) clicking >>> around and I've already gotten multiple 20s pauses and three instances. >>> Something is seriously wrong here. Whether or not it's rational to have >>> so many instances started, pending requests shouldn't be shunted to >>> non-warmed-up servers, right? >>> >>> I've tried upping the min latency to a high value to see if this >>> improves the situation. If this works... shouldn't min latency *always* be >>> as high as the startup time for an instance? >>> >>> I know it's been said before, but it needs to be said again... the >>> guidance for scheduler configuration is really, really inadequate. >>> >>> Jeff >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google App Engine for Java" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/google-appengine-java/-/zULJyO6VtHwJ. >> >> 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.