Tag Info

Hot answers tagged

2

You can use the admin command: db.adminCommand({setParameter:1, ttlMonitorEnabled:false}); To re-enable, use the same command with true.


2

Yes you can with a single command: db.getSiblingDB('admin').runcommand({ movePrimary : "YourDBName", to : "shard001" }) then is important to flush configuration on all mongos (suppose all than the one that did the move, but better be safe): db.adminCommand({flushRouterConfig: 1}) If your databases are small you can do it on-the-fly, else you better plan ...


1

You might have missed this little bit of the nsSize docs (highlighting mine): Use this setting to control size for newly created namespace files. This option has no impact on existing files So, you can't just change the parameter and increase the number of collections for an existing database - that will still be at the old value. The setting ...


1

The docs for MongoDB discuss the behavior of copyDatabase in detail: http://docs.mongodb.org/manual/reference/method/db.copyDatabase/#behavior Specifically, copyDatabase reads the data from the source DB the same way something like a backup or full collection query would read it - that means that it may impact the performance of that DB (for example, by ...


1

In my opinion if your fragmentation is not over 15-20% its not worth doing that (except if you are running out of disk space). What i would do is: 1) Add an arbiter to each replica set (optional) 2) Shutdown one of the secondaries and delete the data directory 3) Start the secondary and let it do the initial sync which removes fragmentation (at this ...


1

have you looked at having Historic Players and Historic Team collections? Then if you wanted stats about the players at the time, you'd probably want to copy out the current players on the team in your historic games documents. You'd probably want to store that as an array in the Historic Games table as the current players list might be different than the ...


1

You cannot mix and match resolvable and non-resolvable host addresses in your cluster. When you started your config servers and another mongos, you had told them their hostnames are X.X.X.X (the IP you masked in your error message). You are now trying to start a mongos using localhost for the host name/IP - that is not allowed. You must use identical ...


1

Check your mongos, mongod and config servers NTP settings. The clocks on every member of the cluster must return the same datetime. Use the "date" command on linux to verify it.


1

You need to have at least the role of clusterManager to perform this action in 2.6 . If you are a dbadmin you can grantRole clusterManager to current user following this tutorial http://docs.mongodb.org/manual/tutorial/assign-role-to-user/


1

As Antonis said, the number of connections has little relation to the number of databases. In general, the number of connections aren't something to worry about. The MongoDB drivers keep the connections alive to reuse them and to prevent the overhead of setting up new connections. However, each connection is provided with about 1MB of stack server side. ...


1

The filtered replication is not something that is currently implemented in MongoDB out of the box. That said, the replication in MongoDB is based on a special collection named "oplog", that you can listen to and do the filter yourself, and in this case implement the filter you want to push data into another cluster. (This will be viewed as 2 different ...


1

MongoDB at least to current version 2.6+ for sure does not support that as build-in functionality. I guess because a replica set using selective replication won't be consistent. There is a feature called filtered replication in Couch but never tried it: http://wiki.apache.org/couchdb/Replication#Filtered_Replication


1

Under Windows, in a worst case scenario, your pagefile size might have to be set to the size of your data files + physical memory size. So if your data files take up 50GB on disk, the rough guidance, in your case, is to set pagefile size to 53.5GB. This will improve with MongoDB 2.8 release since the new storage engine does not rely on virtual memory ...


1

You can not get all the types from a csv or json file. Lets check the following example: asd;3534;0674;slfo What are the types? The third column with the value 0674 contains a string or an integer, decimal, float or what? Has that leading 0 any meaning? If so, it should be a string/character data. The case is similar with the JSON files: Dates are ...


1

Once you have a cursor, you'll want to call readPref('secondary') on it. http://docs.mongodb.org/manual/reference/method/cursor.readPref/#cursor.readPref And I think you mean replica instead of shard.


1

You have two options: 1) The safest is to use on your driver the "secondary" option as described on the below article: http://docs.mongodb.org/manual/reference/read-preference/ 2) Another option is to tag your secondaries as described below and target your queries against the tag, most drivers offer that option. Disadvantage is that you have to ensure ...



Only top voted, non community-wiki answers of a minimum length are eligible