Commit 6ac5f7b 1 parent efd6347 commit 6ac5f7b Copy full SHA for 6ac5f7b
File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package evergreen
3
3
import (
4
4
"context"
5
5
"fmt"
6
+ "net"
6
7
"net/http"
7
8
"os"
8
9
"path/filepath"
@@ -658,11 +659,19 @@ func (s *DBSettings) mongoOptions(url string) *options.ClientOptions {
658
659
SetReadConcern (s .ReadConcernSettings .Resolve ()).
659
660
SetTimeout (mongoTimeout ).
660
661
SetConnectTimeout (mongoConnectTimeout ).
662
+ SetMaxConnIdleTime (30 * time .Second ).
661
663
SetMonitor (apm .NewMonitor (apm .WithCommandAttributeDisabled (false ), apm .WithCommandAttributeTransformer (redactSensitiveCollections ))).
662
664
SetBSONOptions (& options.BSONOptions {
663
665
ObjectIDAsHexString : true ,
664
666
})
665
667
668
+ dialer := & net.Dialer {
669
+ Timeout : 30 * time .Second ,
670
+ KeepAlive : 300 * time .Second ,
671
+ }
672
+
673
+ opts .SetDialer (dialer )
674
+
666
675
if s .AWSAuthEnabled {
667
676
opts .SetAuth (options.Credential {
668
677
AuthMechanism : awsAuthMechanism ,
You can’t perform that action at this time.
0 commit comments