avoid being dragged down by too many connections.IndexCounters:btree:misses the number of misses of the index, and the ratio of hits to consider whether the index is correctly established. 6:db.currentop (): View the currently executing action> Db.currentop ()
{"Opid": "shard3:466404288", "active": false, "Waitingforlock": False, "OP": "Query", "ns": "Sd.usersemails", "Query ": {}," client_s ":" 10.121.13.8:34473 "," desc ":" Conn "}
Kill if necessary: Db.killop ("shard3:466404288")
1: Download MongoDB 2.6 versionHttps://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.6.9.zip2: UnzipTAR-ZXVF Mongodb-linux-x86_64-2.6.9.zipMV mongodb-linux-x86_64-2.6.9 MongoDB 3: Create data directory and log directory and conf configuration file in MongoDB directoryBoth data and log directories are guaranteed to have read and write access4: Edit config file vi mongo.confAdd logappend=true# to the =/root/software/mongodb/log/mongod# Data Catalog dbpath=/root/software/mongodb/data# l
Mongodb replica set
After the parameters are configured on the node respectively, the following hapame-db is displayed :~ # Cat/etc/mongod. conf | grep jieshireplSet = jieshi restart the MongoDB server and ensure that there are no other databases (except adminlocal) on the server. If there are other databases, in this step rs. initiate (hapameconfig). An error is returned. Log on to one of the MongoDB servers and configure hapame-db :~ # MongoMongoDB
There is a problem with redis replica today. After the slaveof command is executed, slave info is displayed as disconnected from the master. The following error is returned when you view the system log: connecting to master... [17727] 07 Dec 11:31:03 * master Found the root cause:Http://groups.google.com/
Group/redis-DB/browse_thread/
Thread/dc1_6861b174358When I look at the start part of the system log of the master node, the following warning is dis
Transferred from: http://www.cnblogs.com/sxmcACM/p/4127114.html1. Let's start by talking about the function's copy mechanismSee a simple code1 # include2 # Include34int Add (int N,IntM{ 6 int z = n + M; 7 return} 9 10 int main () 11 {12 printf (%d\n1, 213} When the function returns, the memory is recycled and the value can still be printed, because the function's copy mechanism2. A copy of the structure1 # include2 # Include34structMyStruct5{6int a[5];7IntN8};910void Change (stru
Address: Https://github.com/mneorr/Alcatrazfuzzyautocompleteplugin--xcode 5 Code Auto-Complete pluginFuzzyautocompleteplugin is a Xcode 5 compatible plug-in, adding fuzzy matching to improve the auto-completion of the Xcode code, developers do not have to follow the principle of a scratch, as long as the method to remember a keyword can be matched, a good increase in productivity. Note: This plugin is only tested on Xcode 5, and there is no compatibility between Tests and other plugins (except
The quorum-based voting for replica control is due to [giifford, 1979] [2]. Each copy of a replicated data item is assigned a vote. Each operation then has to obtainRead Quorum(VR) orWrite Quorum(VW) to read or write a data item, respectively. If a given data item has a total of V votes, the quorums have to obey the following rules:
VR + vw> V
VW> V/2
The first rule ensures that a data item is not read and written by two transactions concurre
synchronously is faster.In addition, Mongodump/mongorestore to recover without oplog is not really appropriate as a "restore from backup" strategy.from which member to synchronize the data (who-sync from)MongoDB initialization synchronization data, may be synchronized from the main node, or from the node synchronization, according to the nearest neighbor principle, select the nearest node to synchronize the data;
By default, the ' member ' syncs from the ' closest member of the ' set ' is eith
Label:Original:http://hedengcheng.com/?p=892 Summary: First, from the shared storage, the traditional relational database how to achieve the strong consistency of the main preparation
When the transaction commits, it initiates two write log operations, one is to write the log to the local disk, the other is to synchronize the log to the repository and ensure the operation of the disk;
The main library now waits for all two operations to return successfully before returning to the
single-machine switch to replica set method step
1: Back up the database, turn off the current database
/u03/mongodb/bin/mongodump-d Configuration-o/u02/dump/
Use admin db.shutdownserver ();
2: Start two data nodes on both machines as follows:
/u01/mongo/bin/mongod--dbpath=/u01/mongodb/data/--logpath=/u01/mongodb/logs/node1.log--replSet replcopy/ 192.168.191.141:27017--fork
/u01/mongo/bin/mongod--dbpath=/u01/mongodb/data/--logpath=/u01/mongodb/logs/n
single-machine switch to replica set method step
1: Back up the database and shut down the current database
/u03/mongodb/bin/mongodump-d Configuration-o/u02/dump/
Use admin db.shutdownserver ();
2: Start two data nodes on both machines as follows:
/u01/mongo/bin/mongod--dbpath=/u01/mongodb/data/--logpath=/u01/mongodb/logs/node1.log--replSet replcopy/ 192.168.191.141:27017--fork
/u01/mongo/bin/mongod--dbpath=/u01/mongodb/data/--logpath=/u01/mongodb/lo
Tags: member Cal script Fork highlight Port class members INI Mkdir-p/data/mongo/27017/data/mongo/27018/data/mongo/27019
mkdir-p/var/log/mongodb
sudo mongod--replSet Rs-local-test--dbpath/data/mongo/27017--port 27017--logpath/var/log/mongodb/27017.log--fork
sudo mongod-- Replset rs-local-test--dbpath/data/mongo/27018--port 27018--logpath/var/log/mongodb/27018.log--fork
sudo Mongod--replset rs-local-test--dbpath/data/mongo/27019--port 27019--logpath/var/log/mongodb/27019.log--fork
Mongostat--ho
The latest spring-data-mongodb1.8.2 Official document has not been clear how to connect the replica set, I have tried many times to finally succeed, special share to everyone.
mongo.config.replica.set.address=
192.168.1.199:27017,192.168.1.199:27018,192.168.1.199:27019 Mongo.config.replica.set.name=rs0 Mongo.config.database=dbname mongo.config.username=username Mongo.config.password=password
Tags: god master sync SLA database MONGO--GES server1. Master-slave replication is a simple database synchronous backup of the cluster technology1.1 In the database cluster Chinese medicine clear know who is the primary server, the primary server only one, from the server can be more than one1.2 From the server to know your own data source that is, for the master server is who1.3--master is used to determine the primary server,--slave, and--source to control the slave serverCase MongoDB master-
, __rep_process_message_int () For Rep_log messages, call REP_LOG.C, __rep_log () REP_RECORD.C, __rep_apply (): Log.h, struct Log {}-Waiting_lsn, Max_wait_lsn, __db.rep.db, READY_LSN Waiting_lsn:it is the first LSN that we are holding without putting in the log, because we received one or more log rec Ords out of order. Ready_lsn:it is the next LSN of we expect to receive. It s normally equal to "LSN", except at the beginning of a log file, at which point it's set to the lsn of th E first record
', Arbiteronly:true}]} >rs.initiate (config) Initialize Rs.initiate (config), config is the name defined previously When the master and standby library is configured, the standby library is queried.
1 2 3 4 5 6 7
shard1:SECONDARY>usetest switchedtodbtest shard1:SECONDARY>db.t1.find() error:{"$err":"notmasterandslaveOk=false","code" :13435} shard1:SECONDARY>rs.slaveOk() shard1:SECONDARY>db.t1.find() {"_id":ObjectId("5704c11d3e0651733bfdea23"),"x":1}
Rs.st
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.