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
0answers
7 views

Replica Set elected a new primary - i/o timeout on ping

We received this MMS Alert (log level INFO): Replica Set elected a new primary I browsed /var/log/mongodb-mms-automation/automation-agent-verbose.log [2015/09/01 03:45:08.305] [.debug] ...
2
votes
1answer
16 views

How to deploy MongoDB config servers to achieve maximum availability during network partitions?

What's the recommended way to deploy config servers? Assume, we have two shards, each one is a 3-nodes replica set. If I deploy all config servers together with one of these shards, a single network ...
0
votes
1answer
13 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
13 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
45 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 ...
0
votes
0answers
9 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
25 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 ...
1
vote
1answer
23 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 ...
0
votes
0answers
19 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
0answers
13 views

MongoDB Slow updates

My application is doing extremely slow updates, despite my query being covered by indexes. My query is: query = {'spot': df_youtube['spot'].values[key], 'segment': ...
0
votes
0answers
12 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
14 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
1answer
42 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
24 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
19 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 ...
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: ...
0
votes
0answers
41 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 ...
0
votes
1answer
28 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 ...
1
vote
1answer
51 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 ...
2
votes
1answer
27 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
22 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({ ...
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 ...
0
votes
1answer
15 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 ...
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
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 ...
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
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 ...
1
vote
1answer
37 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 ...
1
vote
1answer
22 views

cnames for mongo config server

I am seeing this line in many mongoDB links Use CNAMEs to identify your config servers to the cluster so that you can rename and renumber your config servers without downtime I need some help ...
2
votes
1answer
56 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
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
26 views

service vs. systemctl for mongodb-mms-automation-agent-manager on RHEL7

We installed mongodb-mms-automation-agent-manager-2.0.9.1201-1.x86_64 on RHEL7. There are two ways for starting/restarting/stopping the agent systemctl (the Redhat way) # systemctl -a | grep mms ...
0
votes
1answer
19 views

Can mongoDB split read and write, with primary on HDD, replica sets on SSD?

I have three machines, each machine both has SSH and HDD, I want to save SSD space, and in my env: less write, lots read. So does mongoDB support splitting read and write, with primary on HDD, replica ...
2
votes
2answers
34 views

How do I create a global MongoDB Admin account to see all Dbs?

I'm working on MongoDB, sysadmin helped setup the install. I'm confused about MMS the Cloud Manager, I created an account for @admin database I authenticate successfully but do not see "test" ...
1
vote
1answer
28 views

MongoDB Upgrade to 3.0: HostAndPort Exception

I want to upgrade my small MongoDB-Cluster (1 mongos, 3 config-servers, 2 shards a 3 nodes) running on OpenSuSe 13.1 (64bit) from 2.6.7 to 3.0.5. But it fails at the second step of the upgrade guide: ...
0
votes
0answers
32 views

How should massive effect update queries and scripts be performed?

I have some MongoDB databases in production (at a Mongolab AWS deployment) for which I've sometimes required to apply queries or scripts effecting on whole collections. As collections got over 20k ...
2
votes
2answers
42 views

How do I define the frequency of my mongo backup

I want to know if there is a way to define in Mongo the frequency of backups have to be executed. There is any config file for that? An example will be excellent!! UPDATE I want to create a ...
0
votes
0answers
16 views

Mongo db java driver - resource management with client [migrated]

Background I have a remote hosted server thats running java vm with custom server code for multiplayer real-time quiz game. The server deals with matchmaking, rooms, lobbies etc. I'm also using a ...
1
vote
1answer
18 views

least privilege MongoDB monitoring user (no access to customer data)

We use A Nagios plugin to check the status of MongoDB. Howto create a user with least privileges for this plugin? Admin acess would be a security vulnerability. I found the built in role ...
0
votes
2answers
59 views

MongoDB document delete and fragmentation

I've a MongoDB collection that works like a queue: new documents are insert and old documents (after 60days) are removed. I can see a rapid grown of the datafile size, too rapid. I can be reasonable ...
2
votes
1answer
23 views

Sharding Mongodb while limiting the number of documents to be migrated

I have little experience working with databases, but at my work i was tasked to deploy a sharded Mongodb cluster and the constrain on the shard is: database with multiple colections, 7 collections ...
0
votes
1answer
84 views

MongoDB: Server sockets closed after a few minutes

I am working with multiple AWS intances connected to the same mongo database (inside Compose.io Elastic deployment) but I keep getting the error server <url>:<port> sockets closed after a ...
0
votes
0answers
14 views

Recover from mongodb crash during repair

I ran mongodb(v2.4.9) repair with the --repairpath option to external device and the server got shutdown expectedly. I ran it like this (not the first time): sudo -u mongodb mongod --repair ...
2
votes
2answers
33 views

How to find queries that timed out in MongoDB?

Is it possible to find queries in the system.profile-Collection of a MongoDB-database that did not finish due to a timeout? I found some queries that ran longer than the time specified in $maxTimeMS. ...
2
votes
1answer
77 views

Secondary and Arbiter stuck in Startup

I'm using MongoDB version 3.0.0. I'm trying to setup mongodb replication on our machine. Replication was initially setup but due to some changes on the VM the entire thing crashed. When I tried to set ...
1
vote
1answer
25 views

mongo DB The disk space completelly filled for replicate instance

I am currently facing a scenario that one of the replicate server disk got completely filled up, while our primary server still has additional space left. My confusion is that the cmd like ...
2
votes
1answer
61 views

mongorestore failure: error writing file “/var/lib/mongodb”

I want sync my server db with my local db; dump db mongodump --db [db name] copy dump folder into my local restore dump on my local mongorestore --db [db name] [dump folder path] I ...
0
votes
1answer
49 views

MongoDB WiredTiger compression stats

I'm using MongoDB 3.0.4 with WiredTiger storage engine. I was looking at collection stats and I'm seeking explanation on compression stats fields. What does "page written failed to compress" indicate? ...