Skip to content

Commit

Permalink
redis: use timeouts
Browse files Browse the repository at this point in the history
!restart
  • Loading branch information
siddharthvp committed Jun 28, 2024
1 parent 1d6c9e7 commit b027747
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions redis-io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit b027747

Please sign in to comment.