App Engine Basic scaling <https://cloud.google.com/appengine/docs/java/how-instances-are-managed#introduction_to_instances> makes use of Dynamic Instances. Dynamic instances turn off when they are not being used At All. <https://cloud.google.com/appengine/docs/java/how-instances-are-managed#scaling_dynamic_instances> Therefore, since your loop continuously runs, it is forcing your instance to keep alive and never become idle. The only part in your code block that could possibly hit your two minute idle-timeout is your 'Thread.sleep( MILLISECONDS_TO_WAIT_WHEN_NO_TASKS_LEASED);'.
If you want to properly test your loop, I would recommend performing one of the listed Shutdown Triggers <https://cloud.google.com/appengine/docs/java/how-instances-are-managed#shutdown>. As noted in the blue box <https://cloud.google.com/appengine/docs/java/how-instances-are-managed#shutdown> under the 'Shutdown' section, using LifecycleManager is not reliable and you should not base your code on it. There are many reasons why the LifecycleManager wont get a chance to run during instance shutdown, which could cause many problems in your coding logic. -- 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 https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/c86efe26-5837-412f-91c2-5ae7645f89f2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
