Browse Source

lets increase the redis pool size

backfeed-full-error
Fusl 2 years ago
parent
commit
6d61987ff6
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      main.go

+ 6
- 4
main.go View File

@@ -86,15 +86,15 @@ func (that *ProjectBackfeedManager) PopItem(blocking bool) (*BackfeedItem, bool)
select {
case <-that.Context.Done():
return nil, false
case item := <-that.C:
return item, true
case item, ok := <-that.C:
return item, ok
}
} else {
select {
case <-that.Context.Done():
return nil, false
case item := <-that.C:
return item, true
case item, ok := <-that.C:
return item, ok
default:
return nil, false
}
@@ -511,6 +511,7 @@ func main() {
log.Panicf("invalid REDIS_LEGACY url: %s", err)
}
legacyRedisOptions.ReadTimeout = 15 * time.Minute
legacyRedisOptions.PoolSize = 128
legacyRedisClient := redis.NewClient(legacyRedisOptions)

backfeedRedisClient := redis.NewClusterClient(&redis.ClusterOptions{
@@ -518,6 +519,7 @@ func main() {
Username: os.Getenv("REDIS_BACKFEED_USERNAME"),
Password: os.Getenv("REDIS_BACKFEED_PASSWORD"),
ReadTimeout: 15 * time.Minute,
PoolSize: 256,
})

legacyRedisMetricsHook := redisprom.NewHook(


Loading…
Cancel
Save