title: Why is PyMongo 3 giving ServerSelectionTimeoutError?
body: <p>I'm using:</p>
  
  <ul>
  <li>Python 3.4.2</li>
  <li>PyMongo 3.0.2</li>
  <li>mongolab running mongod 2.6.9</li>
  <li>uWSGI 2.0.10</li>
  <li>CherryPy 3.7.0</li>
  <li>nginx 1.6.2</li>
  </ul>
  
  <p>uWSGI start params:</p>
  
  <pre><code>--socket 127.0.0.1:8081 --daemonize --enable-threads --threads 2 --processes 2
  </code></pre>
  
  <p>I setup my MongoClient ONE time:</p>
  
  <pre><code>self.mongo_client = MongoClient('mongodb://user:pw@host.mongolab.com:port/mydb')
  self.db = self.mongo_client['mydb']
  </code></pre>
  
  <p>I try and save a JSON dict to MongoDB:</p>
  
  <pre><code>result = self.db.jobs.insert_one(job_dict)
  </code></pre>
  
  <p>It works via a unit test that executes the same code path to mongodb.  However when I execute via CherryPy and uWSGI using an HTTP POST, I get this:</p>
  
  <pre class="lang-none prettyprint-override"><code>pymongo.errors.ServerSelectionTimeoutError: No servers found yet
  </code></pre>
  
  <p>Why am I seeing this behavior when run via CherryPy and uWSGI?  Is this perhaps the new thread model in PyMongo 3?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>If I run without uWSGI and nginx by using the CherryPy built-in server, the <code>insert_one()</code> works.</p>
  
  <p><strong>Update 1/25 4:53pm EST:</strong></p>
  
  <p>After adding some debug in PyMongo, it appears that <code>topology._update_servers()</code> knows that the server_type = 2 for server 'myserver-a.mongolab.com'.  However <code>server_description.known_servers()</code> has the server_type = 0 for server 'myserver.mongolab.com'</p>
  
  <p>This leads to the following stack trace:</p>
  
  <pre><code>result = self.db.jobs.insert_one(job_dict)
  File "/usr/local/lib/python3.4/site-packages/pymongo/collection.py", line 466, in insert_one
  with self._socket_for_writes() as sock_info:
  File "/usr/local/lib/python3.4/contextlib.py", line 59, in __enter__
  return next(self.gen)
  File "/usr/local/lib/python3.4/site-packages/pymongo/mongo_client.py", line 663, in _get_socket
  server = self._get_topology().select_server(selector)
  File "/usr/local/lib/python3.4/site-packages/pymongo/topology.py", line 121, in select_server
  address))
  File "/usr/local/lib/python3.4/site-packages/pymongo/topology.py", line 97, in select_servers
  self._error_message(selector))
  pymongo.errors.ServerSelectionTimeoutError: No servers found yet
  </code></pre>