Tagged Questions

MongoDB is a scalable, high-performance, open source, document-oriented database. It supports a large number of languages and application development platforms. Questions about programming should be asked on http://stackoverflow.com.

learn more… | top users | synonyms

1
vote
1answer
8 views

MongoDB Insert Performance

I have some data which are aggregated in chunks and later pushed into another collection. The problem is that aggregated data pushing to another collection is very slow and takes from few hours and i ...
1
vote
2answers
14 views

Query to Secondary on Sharded Cluster

How to specify query from mongos shell which is inteded to query data from secondary? The goal is not to bother primary load on write and use data in secondary shards instead.
0
votes
1answer
11 views

MongoDB Tag-Aware Sharding Workflow

I wonder the work flow of sharding cluster in Tag-Aware Sharding. --- Sharding Status --- sharding version: { "_id" : 1, "version" : 3, "minCompatibleVersion" : 3, "currentVersion" ...
0
votes
1answer
19 views

Improve the insertion rate of mongo sharded cluster

I can't disable the write concern while i mongorestore with .bson file. It totally damages the insertion rate (insert/sec). This is my sharding status. mongos> sh.status() --- Sharding Status --- ...
0
votes
1answer
8 views

MongoDB - Change primary shard only for a certain database

I have a sharded MongoDB cluster running 3 different Databases. Currently all 3 databases has the same shard configured as their primary shard (shard000) Is it possible to change the primary shard for ...
0
votes
1answer
26 views

Repair database on Replica in sharded set up

I am using mongo sharding in my DB. The scenario I am facing is that I have deleted some of my collections in my DB. But as to reclaim the space I need to run repair option which i can not run using ...
0
votes
1answer
28 views

Does remove document automatically remove the index that reference this document?

I am wondering if removing the document will automatically update the index if this document is referenced?
0
votes
0answers
11 views

Mongodb parent reference tree get current location and full path

I'm making parental reference tree with MongoDB and Mongoose. My schema looks like this var NodesSchema = new Schema({ _id: { type: ShortId, len: 7 }, name: { // name of ...
0
votes
1answer
14 views

MongoDB Manual References vs DBREF

I've been researching MongoDB and trying to see if it would be a fit for my company's product catalog. I came across database references: http://docs.mongodb.org/manual/reference/database-references/ ...
0
votes
1answer
22 views

MongoDB - how to reduce numYields

I have a MongoDB database with ~100GB data size. I ran a test with 300 threads and queries are all reads, no writes (except writes to db profiler I guess). I enabled database profiler to keep track of ...
0
votes
1answer
21 views

MongoDB - can read cause write locks?

I have a MongoDB database with ~100GB data size. I ran a test with 300 threads and a total 10,000 'read' queries. I notice on the MMS lock% it is showing 0.6 ~ 1% of write lock. My question is, the ...
0
votes
2answers
26 views

MongoDB/MySQL - auto increment vs object ID

I am in the process of evaluating MongoDB and writing some basic PHP applications around it. Typically in my PHP/MySQL applications, I would create an ID field and set it to auto-increment on each row ...
0
votes
1answer
21 views

How to update a field in sharded environment in mongodb using C# driver

I have successfully done loading in sharded environment. It is working fine. But when I do update in sharded environment, I am getting the error as : WriteConcern detected an error 'update { q: { ...
2
votes
1answer
18 views

Do MongoDB's “read uncommit” and “write lock” conflict with each other?

I was reading the MongoDB documentation, where it says about read uncommit: MongoDB allows clients to read documents inserted or modified before it commits these modifications to disk, regardless of ...
0
votes
1answer
27 views

MongoDB Replica Set Can't be connected To

I just set up a replica set for a standalone Mongo instance using the following changes to my config and rs.initiate(). # in master/slave replicated mongo databases, specify here whether # this is a ...
0
votes
0answers
28 views

Horizontal scaling for Sql and No-sql, Its advantages and disadvantages [closed]

I'm exploring horizontal scaling for sql and no-sql. I've experience in setting up master-slave/master-master for mysql, Also had setup Replication with 3 nodes for Mongodb. I would like to know more ...
1
vote
1answer
84 views

Sample YAML Configuration Files for MongoDB?

The MongoDB configuration options documentation lists all the available options that can be specified, but does anyone have a set of fully formed example YAML formatted config files for MongoDB ...
0
votes
1answer
18 views

Data distribution in mongos with shards or replica sets

I am a newbie to mongodb.I have set an mongodb architecture with a single mongo shard(mongos) connected to three shards(replica sets) with three config servers. The architecture looks as below: Now ...
0
votes
0answers
39 views

MongoDB to store vehicle tracking information

I am building an app similar to Uber for tracking vehicles. Since the update frequency is so high (accounting for several users), I want to know the general practices involved for making writes faster ...
0
votes
0answers
17 views

Mongodb sharding balancing not working properly, says config servers differ [duplicate]

Iam using a mongodb sharding configuration in which there are 3 config servers, 2 query routers and 2 shards. One of my shard is having 32 gb data and other is having only 6 gb data. Balancing is not ...
0
votes
0answers
9 views

Proper tree NoSQL structure with focus on full-text searching

I developing an app with tree(folder-file) structure, on which I should perform full-text searches with MongoDB. I did a research on the best tree structure practices and found this great article, but ...
0
votes
1answer
21 views

Can I copy a collection in mongoDB from one database to another by copying the db files directly?

I tried using cloneCollection http://docs.mongodb.org/manual/reference/command/cloneCollection/ , but clonecollection takes a lot of time in case of big collection because it starts indexing the data. ...
0
votes
0answers
53 views

Problems in sharding in mongodb

I am currently working on sharding. I have certain issues related to sharding : 1.If I load data again to a collection which is already sharded, the data stays only in one shard and not migrating to ...
0
votes
1answer
28 views

Migration of chunks not taking place in sharding

I am trying sharding in MongoDB. I am working with 1 config server 1 Query router 2 shards I tried hash based sharding. The data is getting partitioned but sharding is not successful. In one ...
0
votes
0answers
10 views

MMS confusing between hosts in different replicasets

I see mms being confused between different hosts of replicasets, for example check the hosts below instead of mapping the hosts like vehicle-mongo-1.prod-3.cloud.edmunds.com ...
0
votes
1answer
14 views

Standalone MongoDB to MongoDB Shard Setup

I'm learning MongoDB currently so maybe the title of this question is worded poorly, but I'm looking to understand the scaling of Mongo better. I did some research on what DB would be best for my ...
0
votes
1answer
52 views

MongoDB can't add new replica set member

I have a replica set, and I added a new member to the set. The initialSync begins for the new member and rs.status (on primary) shows STARTUP2 as status. However, after a long enough time, there's a ...
0
votes
0answers
11 views

MongoDB object pointing [migrated]

I am doing an web app and i have a doubt. I need to get a value of a MongoDb JSON? object. I post my code.. import pymongo try: conn =pymongo.MongoClient('localhost') print('Conexion ...
1
vote
1answer
28 views

Is possible to bypass the 32 bit limitation in MongoDB?

Can you help me please? I have got server for research purposes, where I have used MongoDB. But in this time size of my data exceed 2 GB limit. I do not any possibility of migrating to 64 bit. ...
-2
votes
1answer
22 views

How to configure maximum number of connections of MongoDB server on Windows?

I need to run a Java program that have massive amounts of read requests from a Mongodb instance hosting on a Windows machine. How can I boost the speed to read? I googled similar topics but they are ...
0
votes
1answer
22 views

Re-posting schema

I'm building a social network very similar to Twitter, in which users can see a feed with content posted by users they follow. Users can like and re-post (i.e. "Retweet") posts. Re-posted content ...
0
votes
0answers
18 views

Mongo Replication with VIP

Have anyone implemented Mongo replication using replset arbiter. At the time of fail-over from Primary to Secondary, Arbiter should bring down VIP on primary and enable on secondary when Arbiter ...
1
vote
1answer
50 views

mongodb shard chunk migration 500GB takes 13 days - Is this slow or normal?

I have mongodb shard cluster, shard key is hashed. It has 2 shard replica sets. Each replica set has 2 machines. I did an experiment by adding another 2 shard replica sets, and it starts to ...
0
votes
1answer
48 views

what is so special about MongoDB indexing?

I was reading the MongoDB documentation, where it lists Indexing as an special feature. But after reading the doc, I still can't see what it is that makes MongoDB index special. Anyone can explain?
0
votes
1answer
21 views

Search result from two collections

I'm new to MongoDB. Lets say I have a collection of blog post, and a collection of authors. I want to search for posts e.g. by topic, and language. But I only want results by certain authors, e.g. by ...
0
votes
0answers
30 views

Creating SSL certificates for a MongoDB replication set

So I figured out my issues regarding connecting a node to a node or a client to a node in my replication set and now I'm trying to figure out how to bring this together so that all of my nodes can ...
0
votes
1answer
61 views

Issues with self signed certificates, SSL and MongoDB

Note: As specified in my comment I've figured out a solution to this issue regarding a single client/mongo connection. The next step is to figure out a solution for a replica set involving this fix. ...
0
votes
1answer
33 views

MongoDB replica set - no election after primary node failed

For testing I killed the primary node of my two-node replica set while the cluster was under heavy write load. I was expecting the secondary node would take over after a few seconds, but this isn't ...
0
votes
0answers
23 views

MongoDB status says all 3 replica are secondary

I've been testing usage of the replica set feature in MongoDB. This morning I tried connecting to the DB, and found that I wasn't capable of doing so. I consoled in to get the rs.status() and got ...
1
vote
1answer
25 views

How to isolate 1 MongoDB config server

I need to preform a rolling upgrade on my MongoDB. I've been all over the Mongo documentation and I can't find a solution to my problem (if there is one) Here's a simple sketch of the Architecture: ...
0
votes
2answers
45 views

One of databases in MongoDB suddenly gets high lock %

I observe repeatable, sudden, short-time update queries slowdowns in MongoDB cluster for single database. That slowdowns lasts about 30 seconds and repeats few times a day. I found that lock % and ...
0
votes
1answer
38 views

What can cause mongodb used memory to increase?

We have a MongoDb instance which contains two main db use about 30G of disk. >show dbs; admin (empty) l_comment 17.945GB l_recommend 15.946GB lifeix_relation 1.953GB ...
1
vote
1answer
16 views

Mongostat shows 2 updates on Primaries when insert data

When i insert data to a mongo sharded cluster it shows 2 updates on the Primaries (check localhost:55030). Does anyone knows where these updates come from? I only do inserts using for (var i = 1; i ...
0
votes
1answer
39 views

MongoDB Benchmark with write-intensive on geo-indexed DB

I am using PostgreSQL 9.3 on AWS RDS to store geo information into an indexed table of points. My data is write-oriented, meaning that I write nearly 1,000 points per each geo search query. I am ...
0
votes
1answer
17 views

MongoDB:Read from slave dirctly,how to guarantee that the data is just up-to-date?

I know that MongoDB is the master/slave architecture,to make the read faster,some read request is directly sent to slaves.But since it is a distributed system,when the data is write to a master,the ...
0
votes
1answer
42 views

MongoDB failover process

Hello guys I've been all over the MongoDB documentation (http://docs.mongodb.org) and I can't find a solution to my problem. Imagine the following scenario: I have 2 Nodes (1000Km apart). Both nodes ...
0
votes
0answers
68 views

Mongo client cannot connect on first try in bash script

I'm working on a bash script for automatic MongoDB server installation and user creation. #!/bin/bash apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 echo 'deb ...
0
votes
1answer
30 views

Is it correct to use IP addresses (instead of hostnames) while configuring Mongo DB cluster? Does it cause any issues?

I have been using Mongo DB Cluster for some data analysis (Mongo DB version 2.4.5). My configuration is as follows: 1) Node1 - mongoconfig server, mongod shard 2) Node2 - mongoconfig server, mongod ...
1
vote
1answer
88 views

Socket recv() timeout on secondary nodes

We started using MongoDB pretty recently. We are on version 2.6.3. We have a replica set of 4 nodes (1 Primary + 3 Secondary) We are currently seeing some latency in replication. The Secondary nodes ...
5
votes
2answers
40 views

Mongodb - see when a database was dropped

I want to know if there is a way to see when a database was dropped. Is there an entry in a log file or some other way to see when this occurred