This is an automated email from the ASF dual-hosted git repository. jeremiaswerner pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push: new 77561d8 Adjust controller side action time-out to avoid invokers marked as unhealthy (#3040) 77561d8 is described below commit 77561d84b0680d1a8105bb4d5c38d578fb26413d Author: Martin Henke <martin.he...@web.de> AuthorDate: Wed Dec 6 16:32:31 2017 +0100 Adjust controller side action time-out to avoid invokers marked as unhealthy (#3040) * adjust controller side action time out * take the standard duration as the lower limit for timeout --- .../whisk/core/loadBalancer/LoadBalancerService.scala | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/core/controller/src/main/scala/whisk/core/loadBalancer/LoadBalancerService.scala b/core/controller/src/main/scala/whisk/core/loadBalancer/LoadBalancerService.scala index be3bb0b..5be950d 100644 --- a/core/controller/src/main/scala/whisk/core/loadBalancer/LoadBalancerService.scala +++ b/core/controller/src/main/scala/whisk/core/loadBalancer/LoadBalancerService.scala @@ -44,17 +44,10 @@ import whisk.core.connector.MessageFeed import whisk.core.connector.MessageProducer import whisk.core.connector.MessagingProvider import whisk.core.database.NoDocumentException -import whisk.core.entity.{ActivationId, WhiskActivation} -import whisk.core.entity.EntityName -import whisk.core.entity.ExecutableWhiskActionMetaData -import whisk.core.entity.Identity -import whisk.core.entity.InstanceId -import whisk.core.entity.UUID -import whisk.core.entity.WhiskAction +import whisk.core.entity._ import whisk.core.entity.size._ import whisk.core.entity.types.EntityStore import whisk.spi.SpiLoader - import pureconfig._ case class LoadbalancerConfig(blackboxFraction: Double, invokerBusyThreshold: Int) @@ -185,11 +178,14 @@ class LoadBalancerService(config: WhiskConfig, instance: InstanceId, entityStore namespaceId: UUID, invokerName: InstanceId, transid: TransactionId): ActivationEntry = { - val timeout = action.limits.timeout.duration + activeAckTimeoutGrace + val timeout = (action.limits.timeout.duration + .max(TimeLimit.STD_DURATION) * config.controllerInstances.toInt) + activeAckTimeoutGrace // Install a timeout handler for the catastrophic case where an active ack is not received at all // (because say an invoker is down completely, or the connection to the message bus is disrupted) or when // the active ack is significantly delayed (possibly dues to long queues but the subject should not be penalized); // in this case, if the activation handler is still registered, remove it and update the books. + // in case of missing synchronization between n controllers in HA configuration the invoker queue can be overloaded + // n-1 times and the maximal time for answering with active ack can be n times the action time (plus some overhead) loadBalancerData.putActivation(activationId, { actorSystem.scheduler.scheduleOnce(timeout) { processCompletion(Left(activationId), transid, forced = true, invoker = invokerName) -- To stop receiving notification emails like this one, please contact ['"commits@openwhisk.apache.org" <commits@openwhisk.apache.org>'].