Hello, @James_Kovacs
Thank you for the reply. Here are some clarifications:

  1. We are using C# driver for Unity server and build using “Dedicated Server” with target platform “Linux” (also windows was tested, both leaks)
  2. Empty project is enough to observe the leak. This is only class I had for the experiments:
public class DriverTest : MonoBehaviour
    {
        const string ConnectionString = "mongodb://localhost:27017,localhost:27019/?replicaSet=poolReplSet";

        void Awake()
        {
            Debug.Log("Initializing...");

            var mongoClient = new MongoClient(MongoClientSettings.FromConnectionString(ConnectionString));

            Debug.Log("Initialized!");
        }
    }

GitHub: GitHub - Raildoc1/MongoDriverTest

  1. I tried using various connection strings:
  • “mongodb://localhost:27017” - does not leak
  • “mongodb://localhost:27017,localhost:27019” - leaks
  • “mongodb://localhost:27017,localhost:27019/?replicaSet=poolReplSet” - leaks
  1. 2.18, 2.22 and 2.23 - were the only versions I tested

  2. I compiled for JIT. Not sure if I can use AOT: when I try to build using AOT it says:

Error NETSDK1207 : Ahead-of-time compilation is not supported for the target framework.
  1. I haven’t tried Atlas Serverless instance yet