Hi @D_Guillaumant, welcome to the community.
As per the Connection Pool Options documentation:
In driver 3.5, we introduced some new connection pool-related options –
maxPoolSize
andminPoolSize
– which were only respected whenuseUnifiedTopology
was set totrue
. These options had legacy equivalents namedpoolSize
andminSize
, respectively, which could be used both with and withoutuseUnifiedTopology
set totrue
.
In driver 4.0, the legacy options have been removed, and only
maxPoolSize
andminPoolSize
are supported. We have added options validation which should help you identify any usages of the old names.
Therefore you don’t need to pass these options:
And you can continue by connecting using the following syntax:
MongoClient.connect(process.env.MONGODB_URI)
If you have any doubts, please feel free to reach out to us.
Thanks and Regards.
Sourabh Bagrecha,
MongoDB