Commit 51a9364c by jinfeng.wang

fix

parent d9aff4f5
......@@ -29,7 +29,11 @@ public class GetPackageFromMongo {
MongoClientSettings settings = MongoClientSettings.builder()
.retryWrites(true)
.applyToConnectionPoolSettings(builder ->
builder.maxConnectionIdleTime(6000, TimeUnit.MILLISECONDS))
builder.maxConnectionIdleTime(3000, TimeUnit.MILLISECONDS))
.applyToConnectionPoolSettings(builder ->
builder.maxSize(100))
.applyToConnectionPoolSettings(builder ->
builder.minSize(10))
.applyToClusterSettings(builder -> {
builder.hosts(Arrays.asList(new ServerAddress(mongoUrl, 27017)));
}).build();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment