2015-09-04 22:28:42 UTC
Things to know:
- I waited way too long to do this. It should have been done months ago.
- The total data size is about 800gb. The collection I am sharding is about
85% of that and about 600m documents.
Yesterday I attempted to make this switch and the mongos nearly died. Here
is what I did.
1. Stopped all clients connecting to the replica set.
2. Added the replica set as a shard through the mongos.
3. sh.enableSharding() for the database.
4. sh.shardCollection() for the collection.
5. Switched all clients to point to the mongos.
6. Turned on clients.
This all worked fine for about 20min. Then suddenly all clients froze. The
mongos was reporting 20k+ open connection. After a few minutes the mongos
froze. I couldn't even ssh into the machine for a while. At this point I
switched all clients back to the replica set.
How long after enabling sharding should it be safe to start connecting
through the mongos? Do I need to wait for the initial "balancing" to be
After sh.shardCollection(), is it still safe for clients to connect
directly to the replica set?
You received this message because you are subscribed to the Google Groups "mongodb-user"
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
To post to this group, send email to email@example.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/4ca996df-352e-4f77-a242-a61e71c3a3bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.