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 –
maxPoolSizeandminPoolSize– which were only respected whenuseUnifiedTopologywas set totrue. These options had legacy equivalents namedpoolSizeandminSize, respectively, which could be used both with and withoutuseUnifiedTopologyset totrue.
In driver 4.0, the legacy options have been removed, and only
maxPoolSizeandminPoolSizeare 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