From 20a056e5094f4667dc745f3f8159fc5c85c04957 Mon Sep 17 00:00:00 2001 From: Guilherme Rodrigues Date: Wed, 18 Sep 2019 22:16:39 -0300 Subject: [PATCH] Hotfix: add timeout to session and increase to checkout --- node/index.ts | 7 ++++++- node/service.json | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/node/index.ts b/node/index.ts index c86544b5d..75fc55493 100644 --- a/node/index.ts +++ b/node/index.ts @@ -11,6 +11,7 @@ const TWO_SECONDS_MS = 2 * 1000 const THREE_SECONDS_MS = 3 * 1000 const SIX_SECONDS_MS = 6 * 1000 const TEN_SECONDS_MS = 10 * 1000 +const THIRTY_SECONDS_MS = 30 * 1000 // Segments are small and immutable. const MAX_SEGMENT_CACHE = 10000 @@ -28,7 +29,7 @@ export default new Service({ options: { checkout: { concurrency: 10, - timeout: TEN_SECONDS_MS, + timeout: THIRTY_SECONDS_MS, }, default: { retries: 2, @@ -39,6 +40,10 @@ export default new Service({ memoryCache: messagesCache, timeout: TWO_SECONDS_MS, }, + session: { + concurrency: 10, + timeout: TEN_SECONDS_MS, + }, segment: { concurrency: 10, memoryCache: segmentCache, diff --git a/node/service.json b/node/service.json index 7d8831852..df7d7cce3 100644 --- a/node/service.json +++ b/node/service.json @@ -2,7 +2,7 @@ "stack": "nodejs", "memory": 1536, "ttl": 30, - "timeout": 20, - "minReplicas": 10, + "timeout": 40, + "minReplicas": 20, "maxReplicas": 100 }