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

How to repair mongodb collection when index is corrupt?

Mongo version: 2.6 I think one or more of my MongoDB index is corrupt which is not letting me delete the corrupt collection or make a backup with mongodump Below is the error i get when i try to ...
0
votes
0answers
8 views

indexSize mismatch between primary and secondary members on wired tiger engine

we are using mongoDB 4.0 on wired tiger engine. For the last couple of days, we are observing that indexSize of primary server(marked in blue in attached file) went up drastically compared to its ...
0
votes
2answers
27 views

usage percentage of Mongodb internal cache

I've ran two performance test on a MongoDB server with identical environment/settings AFAIK. I found that the throughput was 10% apart. When I inspected the mongostat logs, I found that Mongodb in ...
0
votes
1answer
515 views

Adding secondary via rs.add on MongoDB

I have a master and slave on Linux (centOS 7). The rs.initiate(cfg) was done, but its shows the below output when trying to add secondary via rs.add: genienational:PRIMARY> rs.add("localhost....
0
votes
0answers
17 views

swap collections in mongoDB

I receive current day transactional data which I dump into a collection called 'collA'. The data will be reportable for max of 4 days, after this the data becomes useless to me. Are the below two ...
-1
votes
0answers
14 views

to write and read in real time daily 15GB data - help select DB [on hold]

Currently, data is managed in a file(csv). The amount of data collected during the day is about 15GB per day. (10-15 GB) Currently, it is saved only as a file and later processed and analyzed. but ...
0
votes
1answer
30 views

MongoDB 4.2 using change streams with read concern majority disabled in a PSA deployment

I currently run a PSA (Primary, Secondary, Arbiter) deployment and thous only have two databearing nodes. In case of a databearing node going down, read concern majority prevented the change stream to ...
2
votes
2answers
2k 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: ...
4
votes
1answer
985 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 ...
2
votes
2answers
1k views

How to run Mongo database db.currentOp(true) command using API

Using the Mongo Java API I can run the currentOp() command like this: MongoClient mongoClient = null; mongoClient = new MongoClient( "127.0.0.1", 27017); db = mongoClient.getDB("admin"); db.command("...
0
votes
1answer
927 views

MongoDB 3.4 Server not starting with bind error following a CentOS 7.4 security update

MongoDB 3.4 server is failing to start following a CentOS security update and reboot. No configuration changes made. The previous update and reboot a couple of days earlier did not cause any ...
0
votes
1answer
1k views

How can I perform a mongoimport to a host that requires an SSL Certificate?

I am trying to load some sample JSON data into a MongoDB database (hosted on IBM Bluemix). The connection requires SSL, and a SSL Certificate has been provided, but I keep getting an error when I ...
0
votes
1answer
339 views

Error while doing in replicaset in windows (MongoDB)

I tried doing the replicatset in windows, but im getting the below error. I checked the mongo process and killed the existing process. Even though the error exists. help me on this pls Thx ...
-1
votes
4answers
19k 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
1k views

Binding specific ips with Mongodb

I am using Mongodb 3.6.3 on Centos 7. I am running the below command: sudo mongod --storageEngine wiredTiger --dbpath /data --bind_ip_all --logpath /var/log/mongodb/mongod.log --fork and ...
1
vote
1answer
306 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 ...
0
votes
1answer
2k views

How to load balance mongodb replica cluster

I have created a mongod replica cluster of 2 nodes , mongo1 and mongo2. to load balance I have added following rule in my haproxy listen mongo_replica_cluster bind *:27017 mode tcp ...
0
votes
2answers
469 views

How can I find out who is trying to connect to my MongoDB?

I have a MongoDB server that I recently configured to allow only SSL connections. Now my mongo.log is filled with this: 2017-05-30T17:39:24.528+0000 I NETWORK [conn7881820] AssertionException ...
0
votes
1answer
30 views

MongoDB is not using the index I created for this specific query

MongoDB 4.0. I have a simple query: db.product.find({ modifiedOn: { $gte: ISODate("2019-08-02T03:00:00.000Z") } }) .limit(10) And a simple index on modifiedOn....
1
vote
1answer
678 views

How indexing on a date field that is constantly updated and or omitted affect performance?

In MongoDB, I have a collection with a date field called last_updated I would like to index. Reason being, I am often querying on a date range of that field in addition to sorting by that field and ...
1
vote
1answer
175 views

mongodb “WriteConcernFailed” on a replica set

I have a replica set of 4 members. 1 primary, 1 arbiter, 1 secondary, and another one that should be secondary, but have issues and is not connected. (in a "connecting..." state). When the ...
6
votes
4answers
8k 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 ...
0
votes
2answers
2k views

Cannot connect to mongos

Following the MongoDB Sharding Documentation, I start a mongos using a configuration file with the specifics of my config server. It seems rather straightforward, yet I am running into an issue. I ...
0
votes
2answers
20 views

MongoDB 2.0.9 IndexStats

I am trying to get the index usage statistics in a mongoDB 2.0.9. I found a similar question in https://stackoverflow.com/questions/44813787/how-to-check-index-usage-in-mongodb but this only applies ...
0
votes
1answer
28 views

mongoDB won't stop with shutdown or kill

Not sure If I can make the same question already made here but here it goes. I have a mongodb fork and running with high CPU usage. I'm trying to shut it down but nothing seems to work. 2729 mwon ...
1
vote
1answer
21 views

Sharded Mongodb stalls randomly

I have setup Sharded MongoDB cluster using hashed sharding in kuberenetes.I first created the config server Replicaset and then created 2 shard replicasets. Finally created mongos to connect to the ...
0
votes
1answer
21 views

Add a new node to Mongo Replicaset using Rsync

I have a 3 shard mongo cluster. Each shard has a 3 node replica set. On each shard, the data size is 3 TB. I want to add 1 more node to each replica set. But its taking lot of time. The initial sync ...
0
votes
1answer
24 views

Connectivity issues in replication process

I've been trying to add a new node to a replica set without success due to these errors: 2019-08-12T06:48:15.031+0200 I ASIO [NetworkInterfaceASIO-RS-0] Ending connection to host mongo03:...
0
votes
1answer
18 views

Benchmarking MongoDB full text search vs MSSQL full text search

I'm working on a project for comparing mongodb and mssql databases performance on full text search. I started with using YCSB benchmark but now that I have a deeper understanding about this benchmark, ...
0
votes
1answer
25 views

MongoDB Replica Set Sync data by Copying Data Files from Another Member

I used MongoDB 3.6 and was following MongoDB documentation: https://docs.mongodb.com/manual/tutorial/resync-replica-set-member to do a full copy of data from Primary node to another mongod instance....
0
votes
1answer
2k views

How to find sources of connections to Mongodb?

In the Mongodb, I can see there are 54 connections from different applications in my local server. Is there anyway to see which one of my applications are using Mongodb more than the others? Imagine I ...
0
votes
0answers
20 views

What does config shard mean here?

I created a MongoDB sharded cluster with replica set rsa, rsb and rsc. Configuration server replica set is configRS. Initially shard status listed only these shards as primary shard for the sharded ...
1
vote
4answers
2k views

MongoDB: Server sockets closed after a few minutes

I am working with multiple AWS intances connected to the same MongoDB database (inside Compose.io Elastic deployment). But i am getting the error server <url>:<port> sockets closed after a ...
2
votes
1answer
1k views

How to add `--sslAllowInvalidCertificates` on mongodb uri?

I have a mongodb server requires x.509 certificate. So I have to use --sslPEMKeyFile and --sslCAFile on mongo shell command to connect to that server. It works fine. In my dev environment, I am using -...
2
votes
1answer
527 views

Progress of mongodump operation jams at a random point

We are executing remote mongodumps to backup collections. For some time now sporadically one of these dumps stops to progress any further and remains to log out the same amount of documents processed ...
4
votes
3answers
7k views

How do I ensure I always connect to Primary/Secondary node in a MongoDB ReplicaSet?

I have a 3 node replica set running on 3 different servers. I have finished setting it up and everything works great. Now I want to give my users two connection strings: Connect to this "xyz" for ...
0
votes
1answer
884 views

Indexes are not visible in a MongoDB replica set

On a local MongoDB instance i can connect using the mongo client, define an index using this command db.collection.createIndex( { score: 1 } ) and then view that index and the default _id index ...
1
vote
1answer
1k views

MongoDB: movechunk failed after adding a new share to cluster

I have a MongoDB cluster version 2.6.8, 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
1answer
468 views

mongo cluster collection count showing different every time

I had a replica set earlier which I have converted to cluster. Current configuration is: 3 shard 4 router 4 config server When I am trying to get count of one of collection sometime it is showing ...
4
votes
2answers
2k views

How to get mongodump --quiet to still report errors?

I'd like to run mongodump so that it only outputs errors (to avoid extraneous logwatch reporting for an automated nightly backup script). I've tried mongodump --quiet but from a quick test this ...
1
vote
0answers
270 views

Interesting Database Designs for Product Catalogue including a Recursive Approach

I am doing some work for a client and they are creating a database of products of which I need to consume product data when it's created and updated to store in a third party service and then present ...
0
votes
1answer
95 views

Mongoimport monitoring successfully entered row/data

How to monitor mongoimport hass successfully saved data into our database? Let's say I have 20,000 rows of CSV data. When I press the button to start mongoimport, the user will see the progress. Is ...
1
vote
1answer
577 views

restore mongodb sharded cluster to another server

MongoDB version is 2.4.12 Production Server has 3 shards and each shard have another 2 replica sets. Config server & router also runs on these servers. Backup procedure : 1. Shutdown one of ...
0
votes
1answer
112 views

In MongoDB serverStatus(), what is the meaning of “connection data handles currently active”?

When running db.serverStatus() in the MongoDB shell (3.4, WiredTiger), the results contain the following data: { "connection data handles currently active" : 94862, "connection sweep ...
0
votes
1answer
88 views

Mongodb what is the cost of array queries?

As far as I can tell, find queries in mongodb involving an array appear very expensive. Take as example the queries given in: https://docs.mongodb.com/manual/tutorial/query-array-of-documents/ db....
0
votes
1answer
235 views

Create a single-server replica set only for watching on change streams

I have a MongoDB database which is of relatively low importance. I shovel data from home automation stuff into it (mostly sensor data, sunlight, switch states and so on) and don't need any replication....
0
votes
1answer
156 views

Regarding restarting instance mongodb

while restarting the mongodb instance the directory mongodb in /var/run is deleting after restarting the instance the again i am creating the directory in /var/run and restarting the service whats the ...
3
votes
1answer
2k views

Speeding up MongoBD query { $ne: [] }

I'm currently doing a MongoDB aggregation but then have a query looking for all documents where a certain field, whose value is an array, is empty. obs = db.collection.count({'things.titles': {'$ne':...
1
vote
1answer
86 views

MongoDB Too many open file while reSync member

I get the problem in many past days. I have MongoDB cluster with 3 shards and 3 replicas. 1 2 3 A O S S B S P S C P O P P - Primary state S - Secoundary state O - Other ...
0
votes
1answer
132 views

mongos is not listen when configured for sharded architecture (version 3.4)

Deal all, I am trying to mount a sharded mongodb server. I configured a replica set, and a configure replicat set. Both replicate are composd from 3 servers root 23792 1 0 14:43 ? 00:...