This commit is contained in:
ziming 2025-05-21 14:48:45 +08:00
parent 420a6d3be3
commit 86142caad1
1 changed files with 3 additions and 2 deletions

View File

@ -25,10 +25,11 @@ func NewKxMixRepoImpl(bc *conf.Bootstrap) mixrepos.KxMixRepo {
hc := &http.Client{ hc := &http.Client{
Timeout: 5 * time.Second, Timeout: 5 * time.Second,
Transport: &http.Transport{ Transport: &http.Transport{
MaxIdleConns: 300, // 最大空闲连接数 MaxIdleConns: 350, // 最大空闲连接数
MaxIdleConnsPerHost: 150, // 每个主机的最大空闲连接数 MaxIdleConnsPerHost: 150, // 每个主机的最大空闲连接数
IdleConnTimeout: 30 * time.Second, // 空闲连接超时时间 IdleConnTimeout: 30 * time.Second, // 空闲连接超时时间
MaxConnsPerHost: 200, // 每个主机的最大并发连接数(默认 100可根据需要调整 MaxConnsPerHost: 300, // 每个主机的最大并发连接数(默认 100可根据需要调整
TLSHandshakeTimeout: 3 * time.Second, // 等待TLS握手。零表示没有超时。 TLS握手超时
}, },
} }
return &KxMixRepoImpl{ return &KxMixRepoImpl{