Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [mongodb]

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

0
votes
0answers
4 views

Mongo restore slowness

while mongo restores of 300GB of database dump it was extremely slow... In mongo log only 1000 documents inserting per second .. anyone knows how to increase the inserting count per second and speed ...
0
votes
0answers
13 views

Time Series Data in MongoDB

I am writing an application that needs to store and analyze users balance in time and also keep the user events in mobile application this has to be done everyday. What es the best schema design for ...
0
votes
0answers
6 views

Mongodb default setup on Azure - connect string from local shell

I have a new Azure VM (Ubuntu 18.04.1 LTS) which has docker. dragam@USDockerVM:~$ IRE> docker --version Docker version 18.09.0, build 4d60db4 Issued the command docker pull mongo. this ran ...
0
votes
0answers
19 views

Where is the connection pool connection timeout set?

I am building a system that outputs information such as visit information and page transition of the user who visited the website to MongoDB. The MongoDB connection pool on the Web site server has ...
0
votes
0answers
24 views

Can't connect to MongoDB by SSH Tunnel with OPENSSH key

I am using MongoDB Compass to connect to a MongoDB Server managed on Laravel Forge. When I select my ID_RSA file and hit "Connect", console returns Cannot parse privateKey: Unsupported key format. ...
0
votes
1answer
16 views

mongodb replica set No Election of Primary with 6 of 7 Nodes UP

I have 8 instances running on Scaleway , 5 for Data and 3 Arbiter. And the versions of mongo on them are such : mongodb2 (mongodb 3.4.9) mongodb4 (mongodb 3.4.15) mongodb5 (mongodb 3.4.15) ...
-4
votes
0answers
11 views

How to create a searchable MongoDB database to an HTML5 site [on hold]

I am a beginner and I am trying to create very small database that holds approximately 20 video game titles. I want to list the game title, genre, and date the game was released. Once these items are ...
0
votes
0answers
10 views

How to Select and Filter Child Array

I have a data as below Data { "Status" : "Pending", "ComEnv" : [ "prod" ], "ComTenant" : [ "us" ], } when i try to export the it into csv, it will show ["prod"]...
0
votes
0answers
27 views

MongoDB Connection String ReplicaSet Not Working

I have set up a MongoDB Replica Set and this is the structure: One primary node. One secondary node. One arbiter node. I have included the output of rs.status() at the end of this post. The problem ...
0
votes
1answer
23 views

Backup of MongoDB collection data and rename the collections [duplicate]

I want to take a collections data backup on a different host, with renaming the Collections. I am very new to MongoDB. Please help me with this task.
0
votes
0answers
15 views

Mongo selectively load and initialize databases

During my point in time disaster recovery for individual databases I need to start an isolated instance of mongod, have it load all the databases, and instantiate them (building indices etc.). This ...
1
vote
1answer
20 views

mongorestore to --oplogReplay or not to --oplogReplay?

The MongoDB documentation on --oplogReplay is a bit vague. It just keeps saying a "point in time" snapshot. How is this different from dropping the sink database and restoring from the source? What ...
0
votes
1answer
17 views

E: Version '2.0.25' for 'mongodb-10gen' was not found while installing this specific version

I'm trying to install version 2.0.25 for some testing work. I followed this documentation. Here are the steps: sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 echo 'deb ...
0
votes
0answers
22 views

MongoDB database design schema for slack-like application [closed]

I have a question about the size and performance of a collection in MongoDB. We are building a slack-like app with workspaces and channels. Each workspace has multiple channels and multiple users. ...
-2
votes
0answers
12 views

MongoDB: text index on a collection with language maps

Given the following type of documents: { "_id": "abc", "title": { "en": "test", "nl": "test", "zh": "测试" } } How can I specify a text index on the title field? I've tried: ...
1
vote
0answers
13 views

MongoDB merge two collections and drop documents with same value in field

In my database I have two collections, but some documents were added (possibly) at different times to both collections. I could use mongodump and then mongorestore for merging. But then I have the ...
1
vote
1answer
42 views

Mongodb as a data ware house?

Will mongodb a good choice as a data warehouse considering following situation? We are building analytics, report generation platform for our client and a typical table growth in terms of rows will ...
0
votes
0answers
52 views

MongoDb can't work without set dbpath command enabled

I upgraded my mongodb on ubuntu 16.04 from 3.6 to 4 and now I can't start my mongodb. Only if I run this command sudo mongod --dbpath /var/lib/mongodb/ --journal in separate tap and do not close my ...
0
votes
0answers
22 views

MongoDb Primary trying to connect an already removed member

I removed a one of members of a 2 member replica set. But the primary still tries to connect to that node. rs.conf result: /* 1 */ { "_id" : "ReplicaSet", "version" : 84, "...
0
votes
0answers
12 views

Mongodb - Receiving 11600 using one node

This is my first experience using mongod in a project. The database is running on EC2 instance at AWS in version 3.4.2. The database is storing JSON from my scrapy program, but sometimes the following ...
0
votes
0answers
19 views

Should images be embedded in a MongoDB document when there is a one to many relationship?

Please see the DDL below from my CQRS write database: CREATE TABLE Offer (ID uniqueidentifier NOT NULL, Description varchar(50), Image varbinary(max), primary key (ID)) CREATE TABLE Person (ID ...
1
vote
1answer
48 views

Mongo queries are slow and yielding/waiting for locks thousand times

We are using mongo setup with replica sets on AWS. Setup Details: 1 Primary node: r3.8xlarge 4 secondary nodes: r5.xlarge Mongo version: 3.0.8 (WiredTiger) Database size: 358GB We have configured ...
3
votes
1answer
27 views

Mongo WriteConflictException in log file

I am experiencing ALOT of this WriteConflictException in my mongo log file, this does not seem to affect the application, because I am not seeing any special errors and everything seems to work fine. ...
1
vote
1answer
26 views

Best practices for Feed restructuring in a social app database

I have a social app, where users can post to the school they chose on registration. Each post can have a hashtag and a school (all pointers, (hashtag is optional, school is not)). Users see posts ...
2
votes
0answers
33 views

MongoDB - Best practices for Feed restructuring in a social app database [duplicate]

I have a social app, where users can post to the school they chose on registration. Each post can have a hashtag and a school (all pointers, (hashtag is optional, school is not)). Users see posts ...
0
votes
0answers
48 views

Could not find host matching read preference { mode: \“primary\” } for set rs1

Hi I am trying to create Mongodb sharding using docker. But somehow I am facing this below issue when I am trying to adding server into shard. I have created shard replica set with following command. ...
1
vote
1answer
31 views

Disk block size for mongodb deployment

Why does Mongodb production notes have no recommendations about the disk block size? AFAIU, disk block size would have a considerable impact on a throughput intensive application. Does disk block size ...
0
votes
1answer
73 views

MongoDB - Mongoose query findOneAndUpdate() doesn't update/duplicates the DB

I am trying to save and update (upsert: true - creates the object if it doesn't exist) the result of the Web Api which contains multiple arrays of data to populate the stock chart. Each time I enter a ...
0
votes
1answer
23 views

Equivalant MongoDB query of MySQL date query with arithmetic operations

How we can perform the below given MySQL query in MongoDB preferably in MongoDB-4.0: SELECT *,ABS(TIME_TO_SEC(TIMEDIFF(now(), datefield))/3600) as hours, (field1*field2*field2+field3*(1/(ABS(...
0
votes
1answer
49 views

MongoDB - The connection is not disconnected for a long time

I am building a system that outputs information such as visit information and page transition of the user who visited the website to MongoDB, The MongoDB connection pool of the server of the web site ...
0
votes
1answer
23 views

Change in bind_ip value is not reflecting

I have mongo installed on Centos instance in AWS and I am connecting to the mongoDB server from my system. To connect from remote system we need to change bind_ip value to 0.0.0.0 in /etc/mongod.conf ...
0
votes
0answers
13 views

Strongly consistent backup of Mongo with Aurora at the exact same time

At my employer we use AWS Aurora DB & MongoDB Atlas hosted databases together on one application. So we have nail biting scenarios where records are created on both and typically MongoDB points ...
2
votes
1answer
32 views

Mongodb replica set primary and secondary node conf fail when one slave is down

In my env, I had created MongoDB replica set conf for high availability so one server fails should be handled by other also in my conf I have 3 DB server and 1 arbiter too but, my slave's server ...
2
votes
1answer
16 views

Getting exception on running sh.status() command on MongoDB sharded cluster

I am running sh.status() command on my mongos instance of sharded Mongo cluster and I am getting below exception. mongos> sh.status() assert: command failed: { "ok" : 0, "errmsg" : "error ...
1
vote
1answer
19 views

Service Discovery for MongoDB

What is the best way of implement a Service Discovery like ETCD for use in a mongodb cluster? I wish have, 1 master for HA and two nodes, in my master i have a static ip, but nodes maybe can changes ...
3
votes
2answers
33 views

How to promote hidden mongo node to primary?

We are trying to implement DR setup for our mongodb replica set and currently three nodes in DR are configured to run as hidden nodes. We are trying to test failover to DR which will require promoting ...
1
vote
2answers
38 views

NoSQL or MySQL for storing API usage

I need to be able to track API usage in order to generate reports or charts later. I've been struggling to decide whether to use regular MySQL or something like MongoDB or Elastic Search which I don't ...
0
votes
1answer
26 views

Capturing mongo replica set state from mongo shell

I am trying to capture mongo replica set state from mongo shell. E.g. [root@server ~]$ mongo MongoDB shell version v3.6.8 connecting to: mongodb://127.0.0.1:27017 MongoDB server version: 3.6.8 rs0:...
5
votes
1answer
68 views

MongoDB Migrating away from RocksDB to WiredTiger

We have been working for some time with RocksDB as our engine and we are now trying to migrate to WiredTiger. We have some pretty big databases around 4~12 TB of data and according to the process ...
1
vote
1answer
32 views

unable to start mongod - Fatal assertion 28579 UnsupportedFormat

I was frequently getting Segmentation fault (core dumped). Not knowing what to do, I just restarted my ubuntu. Then tried repair which failed because of Segmentation fault. Now when I am trying to ...
1
vote
1answer
19 views

MongoDB failure scenario

Design Question- During data insertion, if MongoDB failed, can I try multiple retries? I have read somewhere it will retry only one time. What will happen if retry fail? Can I keep the failed ...
1
vote
1answer
19 views

Mongodb ReplicaSet Changing Config Format

I have a 3 node mongodb replica set which uses the old syntax (non-Yaml) syntax that I am trying to change to use the new Yaml syntax old syntax auth = true bind_ip = 0.0.0.0 dbpath = /var/lib/...
0
votes
0answers
18 views

Why slaveDelay is not respected by mongoDB replica?

I've seen related article below: Mongodb replica config slaveDelay but data still sync immediately My secondary node is set to be delayed by 3600 seconds: ... "members" : [ { "_id" : 0, ...
0
votes
1answer
28 views

How is the MongoDB backup snapshot transferred from Ops Manager to file system store?

I am using Ops Manager for backup and restore. In docs, it is mentioned that the initial sync between deployment database and Ops manager happens via streaming 10 MB compressed files. https://docs....
0
votes
0answers
13 views

Mongodb Sharding: connectivity policy incoherence

In the official documentation of Mongodb they say that "Each member of a sharded cluster must be able to connect to all other members in the cluster. This includes all shards and config servers. ...
1
vote
1answer
37 views

MongoDB deployment across cloud and On Premises

We are planning to implement MongoDB as a stretch cluster which includes Primary secondary in DC 1, Secondary secondary in DC 2, Arbiter in cloud(DC 3) where DC 1 and DC 2 are on premise servers and ...
0
votes
0answers
38 views

Best design for this project - MongoDB many-to-many self reference

I'm new to MongoDB and I wanted to create a collection of users that can subscribe to other users (basically a self join). Which of the following way is better (if any) and why? 1: Store both the ...
0
votes
0answers
14 views

Configuring a MongoDB Cluster

I should configure a mongodb cluster with two nodes. Each node should have all data replicated. If one server die, the other should assume as primary. Before I configure the cluster, I'm doing a ...
2
votes
0answers
51 views

Should Azure host write-caching be enabled when using MongoDB's WiredTiger storage engine

I have several virtual machines on Azure running a mongoDB replicaSet with the WiredTiger storage engine. I'm not sure about the proper host caching option to set on the disks that contain the MongoDB ...
0
votes
0answers
39 views

Summarize Mongod logs

How to summarize like below from Mongod logs. Is there any formula. CONNECTIONS total opened: 116 total closed: 113 no unique IPs: 5 socket exceptions: 0 192.168.114.453 opened: 40 ...