descrease net.pool ttl
This commit is contained in:
parent
291b8daf5f
commit
f0ffc9b7bf
@ -49,8 +49,8 @@ func (p *poolService) Init(a *app.App) (err error) {
|
|||||||
return p.dialer.Dial(ctx, id)
|
return p.dialer.Dial(ctx, id)
|
||||||
},
|
},
|
||||||
ocache.WithLogger(log.Sugar()),
|
ocache.WithLogger(log.Sugar()),
|
||||||
ocache.WithGCPeriod(time.Minute),
|
ocache.WithGCPeriod(time.Minute/2),
|
||||||
ocache.WithTTL(time.Minute*5),
|
ocache.WithTTL(time.Minute),
|
||||||
ocache.WithPrometheus(p.metricReg, "netpool", "outgoing"),
|
ocache.WithPrometheus(p.metricReg, "netpool", "outgoing"),
|
||||||
)
|
)
|
||||||
p.pool.incoming = ocache.New(
|
p.pool.incoming = ocache.New(
|
||||||
@ -58,8 +58,8 @@ func (p *poolService) Init(a *app.App) (err error) {
|
|||||||
return nil, ocache.ErrNotExists
|
return nil, ocache.ErrNotExists
|
||||||
},
|
},
|
||||||
ocache.WithLogger(log.Sugar()),
|
ocache.WithLogger(log.Sugar()),
|
||||||
ocache.WithGCPeriod(time.Minute),
|
ocache.WithGCPeriod(time.Minute/2),
|
||||||
ocache.WithTTL(time.Minute*5),
|
ocache.WithTTL(time.Minute),
|
||||||
ocache.WithPrometheus(p.metricReg, "netpool", "incoming"),
|
ocache.WithPrometheus(p.metricReg, "netpool", "incoming"),
|
||||||
)
|
)
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user