[英]64-bit mongodb multiple-shards Issue
I am using 64-bit MongoDB, and i am undergoing test on multiple-shards. 我正在使用64位MongoDB,并且正在对多分片进行测试。 If i keep multiple shards in a single machine.
如果我在一台机器上保留多个碎片。 Its working fine but if i keep shards in different machine, its failed in sharding to second shard.
它的工作正常,但是如果我将分片保留在另一台机器中,则无法将其分片到第二个分片。 I have restricted the first-shard size to 10MB, once its reaches the limited size in first shard it should start sharding to second-shard but not happening so.Instead failed to store in second-shard updating to first shard.
我已将第一个分片的大小限制为10MB,一旦第一个分片的大小达到限制,它应该开始分片为第二个分片,但不会发生这种情况,而是无法将第二个分片更新存储到第一个分片。 The following are my shard details.
以下是我的分片详细信息。 In my environment initially i have two shards.
在我的环境中,最初我有两个碎片。 The first shard is on my first-machine running along with my application.
第一个分片与我的应用程序一起在我的第一台机器上运行。 The Second-shard is on my second machine.
第二个分片在我的第二台计算机上。 Configuration as follows:- *)On both of my shards, shard-server,configserver,mongos and i have connected mongo through mongos as follows ./mongo hostname:27017/admin and i have added both the shards in first & second shard and enabled sharding for database and collection level by using shard-key.
配置如下:-*)在我的两个分片上,分片服务器,configserver,mongos和我通过mongos如下连接mongo。通过使用分片键为数据库和收集级别启用分片。 Please, let me know if i gone wrong anywhere in the configuration.
请让我知道是否在配置中的任何地方出错。
Advance Thanks, 预先感谢,
Your post could use some editing, this is very difficult to read. 您的帖子可能需要进行一些编辑,这很难阅读。
It looks like you have 2 machines. 看来您有2台机器。 On each machine you have:
在每台计算机上,您都有:
mongod
process serving as one shard mongod
进程作为一个碎片 mongod
process serving as a config mongod
进程充当配置 mongos
process mongos
进程 localhost:27017/admin
localhost:27017/admin
应用程序的副本 Please, let me know if i gone wrong anywhere in the configuration.
请让我知道是否在配置中的任何地方出错。
There are several possible problems here. 这里有几个可能的问题。 Please check the following:
请检查以下内容:
localhost:27017/admin
are you connecting to mongos
or mongod
? localhost:27017/admin
,您是在连接到mongos
还是mongod
? Either one could be running on those ports. mongos
or the sharding will not happen. mongos
否则分片将不会发生。 Your best bet is to start from top and test each piece one at a time. 最好的选择是从头开始,并一次测试每一块。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.