From b027747c29faa5dc543fb0a001cbb54cdc373b09 Mon Sep 17 00:00:00 2001 From: Siddharth VP Date: Fri, 28 Jun 2024 22:50:15 +0530 Subject: [PATCH] redis: use timeouts !restart --- redis-io.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/redis-io.ts b/redis-io.ts index e58fa4e..0d815f0 100644 --- a/redis-io.ts +++ b/redis-io.ts @@ -9,6 +9,10 @@ export const redis = new Redis({ // Prefixing per https://wikitech.wikimedia.org/wiki/Help:Toolforge/Redis_for_Toolforge#Security // A secret prefix string is stored in redis-key-prefix.txt keyPrefix: readFile(__dirname + '/redis-key-prefix.txt'), + + socketTimeout: 2000, + commandTimeout: 4000, + connectTimeout: 5000, }); redis.on('error', err => {