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
3answers
195 views

MongoDB replicaset - Delay in election

I have local set up for 3 mongo DB instances with successful replica set. (1 Primary, 2 secondary). If I terminate Primary instance, one of the secondaries becomes Primary but its taking around 10 ...
0
votes
0answers
9 views

Mongodb - Document versioning

Have anyone implemented document versioning or storing history data of the document for analysis in mongodb. Sort of change data capture but we need to store them and preserve for later analysis if ...
0
votes
1answer
169 views

Why sharding does not show any improvement?

Here is what I did to test sharding performance. I have 4 servers, I ran config server and router on a server. 3 others are meant to be shards. First, I only added one shard to router, then I ran a ...
0
votes
1answer
186 views

bigchaindb set up and run cluster node error

I have been following the instructions given on: https://docs.bigchaindb.com/projects/server/en/latest/production-nodes/setup-run-node.html in an attempt to create a cluster. However I get this error ...
1
vote
1answer
164 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 shard ...
1
vote
1answer
156 views

MongoDB 2d index query with an additional sorting field - performance issue

I have a compound index in a 2d and normal field: "key" : { "_meta.loc.coordinates" : "2d", "_meta.unifiedAt" : 1 }, Then I want to execute the following query with ...
0
votes
1answer
155 views

MongoDB Sharding : What should be the Sharding key if we want to find records with more than one field

I am having collection ("links") with listed fields: collection-name: "links" 1) url 2) title 3) score 4) description 5) ratings (embedded_many) and having index on "url", "title", "score" because I ...
0
votes
1answer
173 views

Expand a date range in mongodb

I have a document structure like { "startDate": ISODate("2015-01-01T00:00:00Z"), "endDate" : ISODate("2015-01-10T00:00:00Z"), "foo" : "bar" } Is it possible to expand the date range like this?...
0
votes
1answer
179 views

Fastest way to sync (or keep import) 3.5TB data from hadoop to sharded mongodb cluster

There are 3.5TB data in our hadoop cluster(yes on hdfs). And we have newly built a sharded mongodb cluster(the latest 3.x) with 3 mongos, 3 configdb and 3 shards(each shard has 1 primary and 2 ...
-2
votes
1answer
236 views

MongoDB Sharding Configuration

I am trying to setup a sharding on Windows Server 2008 R2. I have a batch file in which i added the following commands: When I try to connect to mongos with the default port, I get an error (unable ...
0
votes
1answer
157 views

CRC checkup in MongoDB

I am new to MongoDB and currently working on a project. I read tutorials but I'm unable to find any information about Cyclic Redundancy Check (CRC) in MongoDB. Is there any way to check that the data ...
0
votes
1answer
167 views

MongoDB Lookup Issue

In collection A, we have "batches" : [ ObjectId("56fccffbe7c9f9cf7634dbfe") ], and in Collection B, we have { "_id" : ObjectId("56fccffbe7c9f9cf7634dbfe") } Can we perform a lookup between ...
0
votes
0answers
36 views

Mongoexport and mongodump disk usage rationale

I just had an interesting experience with the mongoexport tool and came out with a doubt about the exporting process' disk usage. I was trying to dump a 50 MB collection to a disk that had 3 GB free ...
0
votes
1answer
39 views

Mongoexport halts when it reaches 101 records

I'm trying to dump a MongoDB collection from a remote server to a local JSON file. First, I do some ssh port forwarding to begin with: ssh -NL 12345:localhost:27017 $REMOTE_USERNAME@$REMOTE_HOST &...
0
votes
1answer
170 views

Why does mongodb primary stops writing sometimes?

I have 3 mongodb servers in our production environment with replica set configured. All the 3 are running in 3 different Ec2 instances. The application server is running in another instance. The ...
1
vote
1answer
164 views

What does “conn” mean in mongostat utility?

I'm troubleshooting an application issue that uses Mongo. I've just started to use the mongostat utility. Does the "conn" column show the number of established, authenticated TCP connections to the ...
1
vote
1answer
397 views

Compression in MongoDb 3.2 does not work

I installed MongoDb 3.2, and configured snappy compression in mongodb configuration file: engine: wiredTiger wiredTiger: engineConfig: cacheSizeGB: 99 ...
0
votes
1answer
537 views

Backing up mongo database of about 120 GB size

We have a mongo database of about 120 GB size. I have run mongodump using nohup and redirecting the logs to /dev/null about 3 days back, but the dump file is ~40GB in size now, and the dump is still ...
0
votes
1answer
286 views

sudo service mongod start returns error 100

I'm encountering the following error upon executing sudo service mongod start in terminal. mongod.service - MongoDB Database Server Loaded: loaded (/lib/systemd/system/mongod.service; disabled;...
0
votes
1answer
185 views

MongoDB - Split brain with 3 DC

I have mongoDB in 3 DC's. DC1 - 3 Nodes with priority 300 DC2 - 3 Nodes with priority 200 DC3 - 3 Nodes with priority 100 Questions :- Say, N/W is broken b/w DC1 & DC2. But, still DC1 is ...
1
vote
1answer
180 views

How to replicate a mongodb pod with its persistent storage (Minikube - Kubernetes)

I made these settings : apiVersion: v1 kind: PersistentVolumeClaim metadata: labels: name: mongo-claim0 name: mongo-claim0 namespace: my-app spec: ...
2
votes
1answer
182 views

How to configure mongodb replica set with redundant networks

I need to set up a mongodb cluster with redundant private networks connecting all the nodes. Mongo's documentation states: ... you should place each mongod instance on a separate host server ...
0
votes
0answers
22 views

Fetch only those record which do not have matching amounts

I have a mongo collection as shown below { "_id" : ObjectId("5c5c86633b897535539c1b36"), "studentId" : "dsdlkjafhiuelfdldahfiu", "marks" : [ "subject" : "Physics", "...
2
votes
1answer
75 views

Hosting Multiple MongoDB Databases on the same MongoDB Instance/Cluster

In MongoDB there are the following conecpts: A MongoDB database exists as a logical unit on a MongoDB Instance which is either a singleton or a cluster running within some number of mongod processes ...
0
votes
1answer
176 views

MongoDB cannot be started after moving the server

I had a happy MongoDB 3.0.5 installed on a VM on a Windows 2012R2 Server, for light use. I moved the VM to a new physical server without any major changes, and to my surprise it cannot be started; and ...
0
votes
1answer
168 views

Tracking MongoDB execution times using PHP

I am currently working on a project using PHP, I have done research and found that microtime() helps with tracking the time of a query in a MySQL database.. how do I do the same for MongoDB, I have ...
1
vote
1answer
169 views

lat, long based search with $near shutdown my mongodb on Linux server

Hey guys i am stuck on critical problem & unable to resolve it. I have a project where there is a collection of UK postcodes having 18,00,000 sample postcode records. I have a search query where i ...
0
votes
0answers
18 views

Mongo Ops Manager Cant Find process for member

When starting mongo ops manager and checking mongodb process it shows 0 mongods, and in system warnings throws the warning "Unable to find process for member XXX:27020 in rs_1" I can conect from all ...
1
vote
1answer
192 views

mysql to mongodb migration

I have table, with around 125 million records in MySql. I want to move it to mongodb. What would be the best approach to migrate this huge table to mongodb? I was thinking to fetch one by one row ...
0
votes
1answer
198 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" ...
1
vote
1answer
52 views

Getting error while creating a New Connection using Studio 3T for Mongo DB

I tried to create a new connection with Studio 3T for Mongo DB. I don't have a previous DB connection and this is the new one that I am trying to create it. I can't able to figure out why this is ...
0
votes
1answer
237 views

Connecting to a self signed mongodb server though mongo shell doesn't require `pem` file

I am using nodejs mongodb driver to connect to a self signed mongodb instance. The MongoDB and Mongo Shell version is 4.0.0. Below is the command to launch a self signed mongodb instance: mongod --...
1
vote
1answer
183 views

How to properly use moveChunk when chunks of certain range needs to be moved?

A MongoDB 3.6.3 database has two shards and a mongodump file with partial data of one collection needs to be restored. The first shard is named "fast" while second "slow". The idea is to restore the ...
0
votes
1answer
205 views

How to query the mongoDB admin database?

I'm trying to execute the below commands taken from the mongoDB docs use admin db.system.version.find( { _id: "authSchema" }) But running those in Robo 3t gives the following output switched to db ...
1
vote
3answers
190 views

MongoDB shard keeps growing, I don't know why?

I've had a project dumped on me and I'm trying to get up to speed withMongo. But I have an immediate firefight, in that one shard in my Mongo cluster just keeps growing and growing, adding more ...
0
votes
2answers
225 views

Access denied when connecting to mongosqld with MySQL

I'm trying to connect to my MongoDB using MySQL through mongosqld. I have mongosqld running with a config file that looks like security: enabled: true mongodb: net: uri: test-db auth: ...
0
votes
1answer
210 views

replica set unable to add a node

I am trying to create a replica set. I had create a primary node then I am trying to add a secondary node but it gives an error message Quorum check failed because not enough voting nodes responde ...
0
votes
3answers
12k views

Mongodb exception: connect failed

Here's the environment: Linux(x64): 16.04 MongoDB: 3.2.15 Error: root@system-test:~# mongo MongoDB shell version: 3.2.15 connecting to: test 2017-07-25T07:31:28.528+0000 W NETWORK [thread1] Failed ...
0
votes
1answer
213 views

Mongosniff Error : unknown opcode

*** CANNOT HANDLE TYPE: 2010 10.117.241.104:27017 <<-- 10.117.241.104:51907 hosts 465 bytes id:14429c 1327772 unknown opcode 2011
0
votes
1answer
201 views

Mongodb Cross-region failover replication aws

I have deployed 3 MongoDB nodes(node-1, node-2, node-3) in AWS. The first two nodes (node-1, node-2) are deployed in Virginia region and the third node(node-3) is deployed in Oregon region and enabled ...
1
vote
1answer
28 views

MongoDB UserNotFound when starting mongod

I have a MongoDB version 2.4 that i wish to upgrade to 4.0. The official solution is to upgrade from 2.4 to 2.6, then to 3.0, and so on. I am attempting to upgrade from 2.6 to 3.0, and also to change ...
0
votes
1answer
215 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 ...
-1
votes
1answer
31 views

MongoDB Performance of Overwriting an Array Field vs Individually Updating the items

The problem I am facing is basically updating the inventory when an order is received in a MongoDB database.The general hierarchy is as follows Manufacturer: { ... Items: [ ... ...
0
votes
1answer
43 views

MongoDB - Database vs Collection memory-wise

Lets say for example i need to have 5 collections, each collection is about 10GB. What is the difference in performance, with emphasis on memory usage, between assigning each said collection to a ...
1
vote
1answer
228 views

MongoDB Using String-Type Shard Key for Zone Ranges

Mongo lets any field type be used to set ranges for Shard Zones, but doesn't specify how analyses are conducted. My goal is to point queries and writes at the exact right server, WITHOUT using a ...
3
votes
1answer
227 views

How to disable ChunkManager logging for MongoDB? mongoconfig.log gets huge

I'm using MongoDB 3.4 for saving other systems logs and mongoconfig.log is getting too much verbosity. It's a sharded clusted, if that helps. I checked the default mongo log verbosity and is set at ...
0
votes
1answer
221 views

Rebalancing fast with mongodb

I am implementing a sharding with MongoDB and have recently added another node, but the rebalancing of data is very slow. Servers have 64 Mac OS with RAM. I need help on how I can run the mongod ...
0
votes
1answer
215 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 ...
1
vote
1answer
238 views

RHEL 7.4, heavy workload(s) and SWAP usage

This might not be the correct board for this, but since I'm a DBA and I'll ask here. I have several RHEL 7.4 servers, running a mix of MariaDB (10.1, 10.2) and MongoDB (3.4). The problem was ...
0
votes
2answers
211 views

Mongo HDD disk grows to fast when insert / deleting data

My Mongo version is 2.6.9 I have an application that is inserting, reading and removing data from Mongo. That's all working fine. However the disk space increases exponentially. My HDD is around 120 ...