|
@@ -47,8 +47,8 @@ func NewCrawlerService(
|
|
httpClient := &http.Client{
|
|
httpClient := &http.Client{
|
|
Transport: &http.Transport{
|
|
Transport: &http.Transport{
|
|
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
|
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
|
- MaxIdleConns: 100, // 最大空闲连接数
|
|
|
|
- MaxIdleConnsPerHost: 100, // 每个主机的最大空闲连接数
|
|
|
|
|
|
+ MaxIdleConns: 500, // 最大空闲连接数
|
|
|
|
+ MaxIdleConnsPerHost: 300, // 每个主机的最大空闲连接数
|
|
IdleConnTimeout: 90 * time.Second, // 空闲连接超时时间
|
|
IdleConnTimeout: 90 * time.Second, // 空闲连接超时时间
|
|
},
|
|
},
|
|
Timeout: 30 * time.Second, // 请求超时时间
|
|
Timeout: 30 * time.Second, // 请求超时时间
|