note 119820 rejected from mongoclient.connect by cmb
| From: | cmb@php.net | Date: | Thu, 01 Sep 2016 10:32:16 +0000 |
| Subject: | note 119820 rejected from mongoclient.connect by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-206451@lists.php.net to get a copy of this message | ||
Note Submitter: East Ghost Com
----
(driver) mongo-1.6.14
throws exception
"Database name cannot exceed 63 characters"
whenever it gets a string over 63 chars.
Looking at MongoClient using ReflectionMethod, MongoClient describes itself as having been passed a
string containing every server that itself has determined exists in your replicaset. In other
words, if there are 26 servers, MongoClient (using ReflectionMethod) returns its own (supposed)
'connect string' as (in our specific case) having over 397 characters! So, essentially,
it returns data about itself that it was never passed, but rather figured out about itself after
invocation.
This is a very exotic error.
Why is there any limit -- particularly one as low as 63 characters -- to the connect string?