Questions tagged [mongodb]

All versions of MongoDB - a scalable, high-performance, open source, document-oriented database.

Filter by
Sorted by
Tagged with
0
votes
1answer
9 views

Mongodb tree structure questions and answers

I'm looking to build a question answer survey system where some questions will be based on the answer of the parent question. The hierarchy level of the questions can go any number of depth based on ...
0
votes
1answer
584 views

mongo shard high disk I/O usage

We are using mongo-cxx-driver -3.1.1 . We have 1 router, 1 config server and 3 shards on cluster. (No replica sets). The shard key is the "_id" field and we execute all sorts of queries, some may be ...
0
votes
1answer
424 views

Mongodb 3.6.3 disappears after 2 weeks on centos 7 ec2 instance

My Mongodb has disappeared 2 times, after 2 weeks, over the weekend within a 4 week time period. I had a snapshot to recover from but I can't keep on recovering my db every 2 weeks. In an ec2 ...
0
votes
1answer
85 views

Trouble connecting to local MongoDB server through app.js

I'm a newbie to MongoDB, and I just set up MongoDB within my Ubuntu terminal with mongod and mongo commands running in separate terminals. However, I can't get my app.js that would launch a website to ...
3
votes
3answers
3k views

Getting empty folder when using mongodump to back up my MongoDB

Basically, I have a problem with using mongodump to back up my MongoDB. This is the general syntax I use in SSH: mongodump -d myDatabaseName -o ~/backups/my_backup This is the resulting message: ...
1
vote
1answer
456 views

NoSQL- automatically cache and update references to other documents as embedded

To avoid having to look up referenced documents, one practice is to embed them (e.g. https://docs.mongodb.com/manual/tutorial/model-embedded-one-to-many-relationships-between-documents/). Is there ...
0
votes
1answer
439 views

How to configure mongodb replicaset of 3 nodes in authentication mode

I had configured a mongodb replicaSet of 3 nodes. It was running fine But WHen i created a adminUser and dbuser on primary node and enabled the authorization in mongodb.conf file of all nodes then ...
1
vote
1answer
277 views

MongoDB instance for production

I am seeking advice before releasing my mongodb server into production from deployment mode. Just to point out the server is working fine on development mode. Scenario: Let's say I have two server ...
1
vote
1answer
402 views

Chunks not splitting on MongoDB sharded clusters

I have created 2 shard servers named rs1 and rs2. Now in the database collection there are multiple records those should split on these 2 servers in chunks. The sharding key is TxnMonth. It is not ...
-1
votes
1answer
336 views

How to store null in a double field in mongodb

My mongodb schema has a field of "double" data type. Sometimes, when there is no value for this field, mongo is storing it as 0.0 but I need it to store as null My Schema: db.createCollection("...
0
votes
1answer
262 views

MongoDB Atlas M0 (Free Tier) BI capabilities

I'm using MongoDB in my server and developed BI tool using cube-js & mongosqld, which worked when mongo was running locally, however after I moved to Atlas using M0 tier I could not connect to it ...
1
vote
2answers
1k views

Why mongodb never end some connection

My mongod runs out of connections from time to time. But when I restart the instance, it becomes normal. I check the log and found some connections were created and never be ended. This cause the ...
2
votes
1answer
461 views

Reliability of mongodump

I understand that the recommended way to backup MongoDB data is to use file system level tools. However, mongodump utility is promoted as a valid alternative for smaller instances, when file system ...
1
vote
1answer
351 views

MongoDB 3.2.10 Index rebuilding did not complete: 11000 E11000 duplicate key error collection

MongoDB 3.2.10 Getting the following error when adding a replica set as WiredTiger. This is sharded cluster ( 3 shards nodes ). 2 Shards replica sets created using wiredTiger storage so only 1 shard ...
0
votes
0answers
16 views

Should I setup my queries to return errors if no results found? [closed]

I'm using mongoengine (python) with MongoDB. It defaults to returning None if a query does not return any results. Just want to know what the best practice is for this. Should I have it return it an ...
6
votes
5answers
23k views

MongoDB — Failed global initialization: Failed to open “/var/log/mongodb/mongod-config.log”

I'm trying to setup the config servers for mongodb sharding. I created a specific config file that is set to log to /var/log/mongodb/mongod-config.log. When I run mongod --config <path-to-config-...
0
votes
1answer
478 views

MongoDB convert standalone mongod to sharded replica set cluster

I have a single replica set having 3 mongod instance, collection in this instance has data already. I want to convert this instance to sharded cluster. I followed Convert a Replica Set to a Sharded ...
0
votes
0answers
11 views

Restore mongodb database from blockstore snapshot backup

I have a situation where I need to restore the mongodb database from the blockstore snapshot backup taken from the ops manager which is used to manage 3 node replica set. I need to restore this backup ...
0
votes
1answer
473 views

Inserts very slow near the end of dataset

I'm trying to insert Whois Records ( domain name and relevant info) into MongoDB after parsing them from CSV files. I currently have a collection for each tLD such as .com, .org etc. During the ...
0
votes
1answer
95 views

How to use mongoexport command with ssl?

I am trying to export collection data from (SSL MongoDB 4.x), for this I am running below command on linux terminal. Earlier I used mongoexport command in Linux terminal without SSL which works ...
1
vote
2answers
428 views

How to change default mongo port on a bitnami instance

I am running a bitnami instance of mongodb for our pre-production. The default port for mongo is 27017. But for security reasons i want to change it but it is not possible. I have tried these things: ...
0
votes
0answers
6 views

Creating unique string value, for key, in mongo, using NodeJS?

We are needing to create a short, but unique key in our database for password recovery. We currently have this code for doing so. This is is causing Mongo Cloud to generate the error: "Query Targeting:...
0
votes
0answers
11 views

how to run db.adminCommand() using pymongo for mongodb 3.6

I want to run this command and get it's output using pymongo module. db.adminCommand({getParameter: 1, logLevel: 1}) or say I want to run this command db.adminCommand( { setParameter: 1, ...
4
votes
1answer
682 views

Flask mongodb assertion 13 not authorized for query on flask_session.sessions

Need help resetting mongodb back to its original state. We have a flask app running with mongodb with authentication turned off. Running on Ubuntu with std Flask. We tried ALL sorts of combinations ...
0
votes
0answers
13 views

Backup and upgrade MongoDB databases

I have a web application using MongoDB (Version 2.6.12), hosted in a (Ubuntu 16.04) server of DigitalOcean. I like to use Robo 3T to connect to the remote database and do simple queries. Sometimes I ...
0
votes
1answer
377 views

how to add shard into current cluster without sharing any chunks

my current cluster sh.status() is as below: shards: { "_id" : "rsDev", "host" : "rsDev/10.60.90.224:27003,10.60.90.224:27004" } { "_id" : "rsRaw", "host" : "rsRaw/10.60.90.224:27001,10....
1
vote
1answer
1k views

How to restore Mongo DB tar.gz archive

Using the Mongo DB Atlas cloud service (MongoDB Version: 3.4.16), the below backup archive of a MongDB was generated: Cluster0-shard-0-1531635127-5b4b0df33b34b92b0f50a045.tar.gz In this file I can ...
1
vote
2answers
3k views

Issue while restarting - MongoDB

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
15 views

MongoDB indexing strategy for any subsequence of multiple fields

Let's say I have huge mongodb collection and each element has fields A, B, C, D, E. I want to filter this collection by different groups of this fields like ABC, BDE, AE and so on. Documentation says ...
1
vote
1answer
542 views

Connection string for connecting mongo database with SSL enabled

Am facing some below problem in my mongodb replication environment I have 3 replica set environment with SSL enabled and ssl mode as preferSSL 3 servers has 3 different Key file with common CA file ...
1
vote
2answers
7k views

Our replica set config is invalid or we are not a member of it - MongoDB

I have started the mongodb server with replica set name 'rs01' enabled on port 27001. Then started another command window to start the mongo db on the same port. The status says the 'rs0' is not a ...
1
vote
2answers
638 views

Why --audit commands does not work in Mongo Enterprise

I am trying to make destination for my user activity log but every time I type --auditDestination I get errormessage "unrecognized option --auditDestination", can anyone tell me what should I do? I ...
0
votes
0answers
21 views

MongoDb write performance degradation when increasing the number of concurrent writers

I was testing MongoDb write performance and noticed the following behaviour: when I increase the number of concurrent writers, the average time needed to write a document increases as well and ...
0
votes
1answer
461 views

How to update collections and restore while doing mongorestore?

is there any way that i can update the collection and restore the same from dump created by mongodump cmd . when we do mongorestore , it directly restores from the dump , but my requireemnet is to ...
65
votes
5answers
188k views

How restore a specific database from backup using mongorestore command

I created a backup of all my databases using mongodump command. Now I want to restore a specific database using mongorestore command. How is this possible, I use this command: --db option then ...
0
votes
1answer
287 views

Find and Insert Missing data in Mongodb Collection

I want to write python3 code to check and insert missing data. My MongoDB collection documents have one field named "height" which is BTC block number. I want to traverse in a range start to the ...
0
votes
1answer
190 views

MongoDB Ops Manager

I have few questions regarding backup process in MongoDB Ops Manager 1) How backup process works ? 2) According to documentation for production do we need to have 3 dedicated servers for ...
2
votes
2answers
1k views

How to get all documents from a particular chunks in MongoDB?

From mongos log, I got the following message balancer move failed: { chunkTooBig: true, estimatedChunkSize: 408839903, ok: 0.0, errmsg: "chunk too big to move" } from: shard4 to: shard1 I know ...
0
votes
0answers
16 views

Product Inventory Management System [closed]

I've been reading inventory management system tutorials for a while but still don't understand. Let's assume we are in charge of developing a typical crud API to serve a variety of products. At first, ...
0
votes
1answer
9 views

mongodump and restore in single command

How to perform mongo DB dump and restore in a single command, by providing source and sink DB and collection name separately? I understand we can do mongodump and then mongorestore but if I need to ...
3
votes
1answer
1k views

MongoDB crashes with out-of-memory or is being killed by oom-killer

A two shards MongoDB database regularly crashes with out-of-memory error or is being killed by the oom-killer. The system runs on GCE Debian 9.4 with MongoDB v3.6.5, WiredTiger storage engine and ...
2
votes
1answer
977 views

Is it possible to run MongoDB javascript scripts in DBeaver

DBeaver's wiki shows a simple query against a Mongo database but what about admin scripts? It would be great to develop these in DBeaver but I've tried a few permutations to no avail. Here's an ...
0
votes
1answer
101 views

how mongo db does locking for updates/inserts?

I have many data for each user that with write heavy and many for each separate users that there is not any relation between user's data; so there is two options for me to store them: 1. keep all user'...
0
votes
1answer
662 views

how to fix replica set error

I am getting this error { "ok" : 0, "errmsg" : "server is not running with --replSet" } when I run the command on windows cmd rs.initiate( { _id : "repl1", members: [ { _id : 0, host : "mongodb0....
0
votes
1answer
566 views

Mongod with bind_ip error “Address already in use”

I'm trying to follow the MongoDB docs tutorial on how to setup a replica set. The command example they provide has a bind_ip parameter, which is not working. If I run the command without it mongod ...
1
vote
1answer
276 views

Fastest way to move Collection from Sharded MongoDB Cluster to a another Sharded MongoDB Cluster

I have to move a MongoDB Collection (Size: 1TB+) from Sharded MongoDB Cluster to another[5 shards on both clusters]. During this operation, it is assumed that the accompanying program will be offline, ...
4
votes
1answer
636 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
21 views

Inserting many documents in collection, but only unique elements, based on specific field

I cannot seem to find an answer on this anywhere. I need the following: Given an array of objects with the structure: { link: 'some-link', rating: 25, otherFields: '..', ...
2
votes
1answer
1k views

Merge 2 mongodb databases

Our team have hard time. Situation: API went down, all infrastructure (API + MongoDB) terminated. We restore API and mongodb (data restored from backup). After a while (let's say 1 day) we discovered ...
0
votes
1answer
33 views

MongoDB - Replication Oplog Window has gone below 1 hours

I'm working with MongoDB Atlas and I have a cluster of 3 with M30 and 100gb of storage. My current usecase is the following: - An user dispatches one search in my platform - The platform dispatches ...

1
2 3 4 5
43