interesting question - where i have used background threads i have done so 
on manually scaling instances.

on our manually scaling instances we have successfully used the modules API 
https://cloud.google.com/appengine/docs/python/refdocs/google.appengine.api.modules.modules
 
to control startup and shutdown of instances.  I think this can be used to 
forcibly shutdown an autoscaling instance as well.

Hope that helps!

cfh

On Wednesday, December 9, 2015 at 1:17:16 AM UTC-8, Erik Kuefler wrote:
>
> The description of basic scaling 
> <https://cloud.google.com/appengine/docs/java/modules/#Java_Instance_scaling_and_class>
>  
> is a little vague about the exact conditions that cause an instance created 
> with basic scaling to be shut down. It says an instance is evicted when it 
> "has not received a request for more than `idle-timeout`", but it's not 
> clear to me whether this includes background threads and the 
> "/_ah/background" request that they generate.
>
> My problem is that my machines are staying alive longer than I expect them 
> to and I suspect a background thread might be the culprit. I'm using a 
> library (Firebase) that creates background threads but provides no way of 
> shutting them down. Will this cause my machines to never be evicted? If so, 
> is there a way for me to either forcibly terminate all background threads, 
> or to shut down the instance from my own background thread (so I can 
> implement my own idle timeout)?
>

-- 
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 google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/f2835db7-f931-40e0-8b6a-b6c4739f0ddb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to