Skip to content

Commit

Permalink
Improve Redis isolated pool eviction (#6202)
Browse files Browse the repository at this point in the history
  • Loading branch information
flvndvd authored Jul 12, 2024
1 parent 642f8ce commit 95b187a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions front/lib/api/redis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ export async function getRedisClient(): Promise<RedisClientType> {
client = createClient({
url: REDIS_URI,
isolationPoolOptions: {
acquireTimeoutMillis: 10000, // 10 seconds.
// We support up to 200 concurrent connections for streaming.
max: 200,
acquireTimeoutMillis: 10000, // Max time to wait for a connection: 10 seconds.
max: 200, // Maximum number of concurrent connections for streaming.
evictionRunIntervalMillis: 15000, // Check for idle connections every 15 seconds.
idleTimeoutMillis: 30000, // Connections idle for more than 30 seconds will be eligible for eviction.
},
});
client.on("error", (err) => logger.info({ err }, "Redis Client Error"));
Expand Down

0 comments on commit 95b187a

Please sign in to comment.