I'm trying to configure a pool connections to my Go program with mongodb, where I set minPoolSize to 20 connections using mongodb go driver. Something like that:
cli, err := mongo.Connect(ctx, options.Client().ApplyURI(uri).SetMinPoolSize(20).SetMaxConnIdleTime(time.Second*5))
I did a test where my program reached 100 connections allowed. After 5 seconds, the number of connections dropped to 10. But it should have kept 20 connections. If I set minPoolSize to 5, it works ok.
Is 10 connections a limit to MinPoolSize for mongodb? How can I change it to keep 20 connections?