title: Initialize MongoClient with MongoClientSettings in C#
body: <p>I'm trying to initialize the MongoClient from the Mongo 2.0 driver as follows:</p>
  
  <pre><code>MongoClientSettings settings = new MongoClientSettings();
  settings.WaitQueueSize = int.MaxValue;
  settings.WaitQueueuTimeout = new TimeSpan(0,2,0);
  settings.MinConnectionPoolSize = 1;
  settings.MaxConnectionPoolSize = 25;
  settings.Server = new MongoServerAddress("mongodb://localhost");
  client = new MongoClient(settings)
  </code></pre>
  
  <p>However, when I now try to insert a document with this code:</p>
  
  <pre><code>db = client.GetDatabase("local");
  col = db.GetCollection&lt;BsonDocument&gt;(collectionName);
  col.InsertOneAsync(new BsonDocument().Add(new BsonElement("id",BsonValue.Create(1)))).Wait();
  </code></pre>
  
  <p>It doesn't do anything. It doesn't get inserted, and no error message (although after a while a first chance exception of System.Timeout appears in the output). If I initialize the client with</p>
  
  <pre><code>client = new MongoClient("mongodb://localhost")
  </code></pre>
  
  <p>It does work and uploads the document as intended.</p>
  
  <p>I want the client to be able to handle a very high write throughput, so I tried these settings first. Did I set some of the settings wrong or is there a different problem?</p>
  
  <p>EDIT: After some more testing, it is indeed a System.Timeout exception I'm getting.</p>