Hi
We're using 5 modules in our Google App Engine application and all modules
uses auto scaling but only 1 of the modules have a background threading
function so its using basic scaling with the following configuration:
<basic-scaling>
<max-instances>2</max-instances>
<idle-timeout>2m</idle-timeout>
</basic-scaling>
As you see instance should be closed in 2 minutes, if it doesnt receive any
request. However if we use the below code block it works like 30 minutes
without shutting down. When we remove the code its shutting down in 2
minutes as it should be. (This is a test code that we are trying to
understand the reason)
private void doPolling() {
//Queue notificationQueue =
QueueFactory.getQueue("notification-delivery");
//PushNotificationWorker worker = new
PushNotificationWorker(notificationQueue);
while (!LifecycleManager.getInstance().isShuttingDown()) {
boolean tasksProcessed = false;
ApiProxy.flushLogs();
if (!tasksProcessed) {
// Wait before trying to lease tasks again.
try {
Thread.sleep(MILLISECONDS_TO_WAIT_WHEN_NO_TASKS_LEASED);
} catch (InterruptedException e) {
return;
}
}
}
log.info("Instance is shutting down");
}
Do you know how can we solve that
--
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/86a5055f-2230-47a2-b4df-34235e67c71a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.