Pārlūkot izejas kodu

lets increase the redis pool size

backfeed-full-error
Fusl pirms 2 gadiem
vecāks
revīzija
6d61987ff6
1 mainītis faili ar 6 papildinājumiem un 4 dzēšanām
  1. +6
    -4
      main.go

+ 6
- 4
main.go Parādīt failu

@@ -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(


Notiek ielāde…
Atcelt
Saglabāt