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

0
votes
1answer
5 views

Locked out of my own database through invariant() failure

I am trying to set up mongodb on my own server and connect to it remotely through my laptop. I had successfully installed the database and created my own user with admin privileges. However, when I ...
0
votes
1answer
120 views

Choosing shard key with compound index field

I have a compound key with field articleId_1_host_1_timeStamp_1_isIndia_1_location_1. Cardinality of fields is articleId has 20000 different value host has 17 value timestamp is increasing field ...
0
votes
0answers
8 views

No Data Replication in Progress mongodb

Setup Information One ConfigServer mongod.exe --configsvr --dbpath C:\MongoDBCluster\ConfigSrv --Mongos Server-- mongos.exe --configdb 10.133.1.130) 2 Shard Servers mongod.exe --shardsvr ...
1
vote
1answer
22 views

Monitor disk usage with MongoDB Ops Manager

We use MongoDB Ops Manager 1.6.2.251. I searched Activity -> Alert Settings. Is there a way to monitor disk usage? To get an alert if this changes to 90%: # df -h /data/ Filesystem ...
0
votes
1answer
447 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: { ...
1
vote
1answer
37 views

What kind of database should I use?

I'm designing a new system and I'm wondering what kind of DB should I use for my needs. I have a tree structure of nodes, where each node has historic values. For each historic value it should hold 2 ...
1
vote
1answer
172 views

Is there any way to change the size of preallocate data file in mongodb?

In mongodb data files are preallocates to a particular size,like first data file .0, the next .1, etc. The first file mongod allocates is 64 megabytes, the next 128 megabytes, and so on, up to 2 ...
0
votes
2answers
15 views

Mongo DB Replica set - not able to read also

We have deployed mongodb replica set: mongod --port 27017 --dbpath /opt/eltropy/mongodb/data/rs0-1 --replSet rs0 --smallfiles --oplogSize 128 mongod --port 27018 --dbpath ...
3
votes
1answer
1k views

verify that mongos server is connected to config servers

I've been writing a backup script for sharded replica-sets and it's almost done, except that I can't seem to get it to successfully start the balancer back up after everything's all said and done. ...
0
votes
2answers
3k views

How to keep Mongodb log small via the conf file (or other persistent method)

This is related to my question in stackoverflow where vb.net simply hang on updating a mongodb query. http://stackoverflow.com/questions/12780258/insert-mongodb-using-vb-net/12796593#12796593 After ...
2
votes
2answers
192 views

Limit the RAM memory usage in MongoDB

I am using MongoDB-2.6.1. Is there any way to limit the RAM memory usage? For example: Out of 4 GB RAM, let MongoDB use till 3 GB (<= 3 GB).
0
votes
1answer
18 views

MongoDB 3.0 Indexes maximum limitation

I have a mongo DB that store user's public messages. Each message should be categorized by at least one TAG (3 max in an array) The TAG can be anything up to 32 characters. ([0..9a..z]) the Tag ...
0
votes
0answers
8 views

GridFS “UPLOAD-ONLY” permissions

I need to allow UPLOAD-only to GridFS. Does restricting role to "insert" to fs.files and fs.chunks do the trick? Does GridFS perform any actions except "insert" onto fs.files during upload?
0
votes
1answer
17 views

Mongo DB Site to Site Migration

I am somewhat new to MongoDB but I do have some experience with MySQL and PostgreSQL. Currently, I need to migrate Mongo DB from one site to another. The sites should be identical (development and ...
1
vote
1answer
21 views

executing shell (bash) commands from within the mongo client

How can I execute shell (bash) commands from within the MongoDB client? With MySQL client: system (!) Execute a system shell command. Is there something similar for MongoDB?
0
votes
1answer
541 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
1answer
111 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
40 views

Query MongoDB Collection Compression Settings?

How can i query the settings for collection compression in MongoDB? I configured WiredTiger as storage engine and as collection compression the zlib algorithm. Here is a snippet of my configuration ...
1
vote
1answer
21 views

What's the procedure to set up username/password on mongodb?

I have tried setting up username / password .But none of the methods seems to work. 1. In mongod.conf ----> remove **#auth=true** to **auth =true** 2.Started the mongod server --> sudo ...
1
vote
1answer
132 views

MongoDB data directory space is increasing

I have a worry, mongoDB data directory space is increasing very rapidly: I have a two data files and each one has reached 2GB limit and starts spawning 2 GB file multiple files. Is there any where I ...
0
votes
1answer
11 views

Date range query for past 24 hour in Mongo shell

I am setting a cron job to collect results from MongoDB database profiler. I'd like to collect results within a 24 hrs period. I plan to run mongo command with javascript. Question is, in Mongo ...
0
votes
0answers
17 views

How to read from Mongodb secondary Only in a replica set?

Mongodb version 2.6.10 Ubuntu 14.04 Currently having a replica set of 4 nodes , my read preference is Primary Only , I configured one node with priority 0 Also i have a file on the priority 0 node ...
0
votes
1answer
736 views

Issue while restarting - mongdb

I had tried to start the mongodb service using the following command in linux machine. service mongod restart I am getting the following error Stopping mongod: ...
0
votes
0answers
7 views

MongoDB Slow updates

My application is doing extremely slow updates, despite my query being covered by indexes. My query is: query = {'kw': kw, 'year': year, '_age_group': ...
0
votes
0answers
11 views

How to merge numerous collections within one colection in MongoDB?

Here is the scenario: In one collection name is "Parent" I have the following document {"_id" : ObjectId("4f7ee46e08403d063ab0b4f9"), "name" : "MongoDB", "range" : "spec", "notes" : { { ...
0
votes
1answer
118 views

Update an array element with inc mongo update

HI All I have this Data in mongo, {"articleId" : [ { "articleId" : "9514666", "articleCount" : 1 } ], "count" : NumberLong(1), ...
1
vote
1answer
254 views

Mongo replication lag slowly increasing

I am running a replica-set in production with slaveOk = false using mongo 2.0.7 in AWS The replication lag on one of the servers is close to 58 hours. This replication lag is sometimes decreasing ( at ...
1
vote
0answers
33 views

MongoDB: movechunk failed after adding a new share to cluster

I have a MongoDB cluster, which already has two shares: share1 and share2. When I add a new share3 to the cluster, data chunk can't migrate to share3. This is from the mongos log: ...
5
votes
1answer
132 views

3 Node Replica Set all became SECONDARY

my 3 set replica set all became secondary and I'm not sure why. db1 2014-12-12T02:43:55.067+0000 [conn1413096] end connection 10.0.64.12:58483 (512 connections now open) 2014-12-12T02:43:55.067+0000 ...
1
vote
1answer
49 views

How can I be sure if MongoDB is doing the balance?

I have the following structure: Two Ubuntu 14.04.2, both with MongoDB v3.0.4 instaled. Both in the same LAN. I want to make them work as a cluster. In the first one, that I call "MC1", I run the ...
1
vote
1answer
209 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 ...
2
votes
1answer
55 views

Dynamic relations in MongoDB

I'm designing a document with MongoDB where users have relationships with each other. Easy enough, right? { _id: "012", username: "happy4u", // ... related: [ '123', // user ...
0
votes
0answers
40 views

mysql - suggestions for table design with huge number of columns

We have a table that consists of a huge number of columns (usually between 500 to 1000, depends on our clients websites). We are suffering from speed issues due to this, and we're looking for the best ...
6
votes
1answer
57 views

Remove a shard in MongoDB

I have a MongoDB cluster, I accidentally hosed a shard, I don't have a backup. It's pretty easy to recover the data, but after issuing the removeShard command, it says it's draining. However, the ...
0
votes
1answer
27 views

MongoDB to MySQL Replication Automatically

i have Mongodb server and mysql server. i want to use mongodb for "write" and mysql for "read". so i am looking for some tool or some process by which we can tranfer mongodb to mysql server on ...
2
votes
1answer
26 views

Sizing a MongoDB shard?

I am in the process of planning a MongoDB deployment, this will be my first to production and I have a question regarding the disk size of each shard in a cluster. This cluster itself will be for ...
0
votes
1answer
20 views

Mongo Create a user as admin for any database raise an error

I am trying to create a simple user with the rights permission to access to any database and can do any actions. When I trying to execute the createUser command I got this error: db.createUser({ ...
2
votes
1answer
222 views

MongoDB installation Ubuntu 12.04 LTS errors

I need some help with my MongoDB installation on a clean, fresh Ubuntu 12.04 LTS server with no nonsense installed. I thought it would be a piece of cake, but I got some errors and the Ubuntu-forums ...
1
vote
1answer
36 views

Why does restarting MongoDB 3.0.x boost performance?

I have a MongoDB in my Development environment running on Windows, the server has 64GB of RAM, but MongoDB has only consumed 26.9GB (here we are building the database), so it should be able to hold ...
0
votes
1answer
14 views

MongoDB MMS replica set fails to restart

I have a MMS replica set deployed with 3 instances. It was working fine until I shut it down this morning in order to do some changes and restarted it. From logs, it feels that there was an unclean ...
1
vote
1answer
20 views

How to update a whole document in MongoDB using PHP?

I want to update my older entries through the PHP interface in MongoDB. First, I get data from the text fields and then store that into variables. Then I use those variables to update data in Mongodb. ...
0
votes
1answer
2k views

Storing multidimensional array in MongoDB

I am attempting to convert a large MySQL database of product information (dimensions, specifications, etc) to MongoDB for flexibility and to move away from the restriction of a column based table. I ...
1
vote
1answer
1k 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
21 views

MongoDB: Multiple timezone support

In Mongodb how to support multiple timezones? Say every client has his own timezone. I want to group by dates. Records are in different timezones before aggregation. The report should be aggregated ...
1
vote
0answers
22 views

MongoDB Update with NODE-RED?

I am in the process of trying to move data around via MQTT with MongoDB as my storage engine. I am using Node-Red to get the MQTT data and store it as JSON objects in Mongo using the mongo node ...
0
votes
1answer
23 views

delete old 'Monitoring Agent' metrics and 'Automation Agent' Debug logs via scheduler

We use Ops Manager 1.6.2.251 # mongo MongoDB shell version: 2.6.10 connecting to: test > show dbs; admin (empty) alerts 0.203GB apiv3 0.578GB ...
0
votes
0answers
19 views

Upgrade MongoDB cluster from 2.4.10 to 3.0.4

I have a MongoDB cluster running on 2.4.10 in production. According to the MongoDB docs, I have to do a step upgrade: from 2.4.10 -> 2.6 -> 3.0.4 For rollback we have to do step rollback: from ...
0
votes
0answers
21 views

Which database is suitable for simple querying/filtering/paging and ability to expire the data?

From what I read, i have to maintain index if I were to use redis. I can set EXPIRE of an object but then I have to update index set myself which is something I rather not do. mongodb has this ...
2
votes
1answer
338 views

MongoDB text index and text search

I have a mongodb collection db.articles,it has 2 keys ,"title" and "abstract".I want to do text search on these two keys.For example, the search text is "physics",and I want all the documents whose ...
1
vote
1answer
275 views

MongoDB can't add new replica set member [rsSync] SEVERE: Got signal: 6

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 ...