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

Mongo DB Upgrade 3.0 to 3.2 Verification of Upgrade

We have a few environments with MongoDB 3.0, these are standalone servers. These servers are already using WiredTiger Storage engine. I am trying to upgrade them to 4.2. As per the upgrade ...
0
votes
0answers
22 views

Sharding standalone MongoDB

I've got a standalone MongoDB server with a lot amount of data on it. Let's say, it's srv1 server. I've decided to make a sharded cluster, so I've created additional servers srv2 and srv3. We have: ...
0
votes
3answers
31 views

How to list connections in Secondary Nodes

In my cluster on Atlas, have a many connections in secondary nodes. How to list this connections? When execute this command, list the current connections in primary node. db.currentOp(true).inprog....
2
votes
0answers
13 views

Adding to MongoDB a new shard. How to minimize Impact on server loads

Is the possible to minimize Impact on server loads while adding to MongoDB 4.2 a new shard? I have found this recommendation. It could help but I sure should be few more thing which we can do. ...
0
votes
2answers
22 views

What is Diagnostic.data file in MongoDb data folder?

I'm trying to create a backup server for my mongodb using the strategy of copying files. I wonder what is Diagnostic.data folder? Should I copy that too? or I can simply ignore it? My Diagnostic....
0
votes
1answer
21 views

MongoDB aggregation framework - group with the sum of the nested document in arrays and count with filter

MongoDB Aggregation Framework Query: $group, $project, $addFields with $reduce and sum. Use Case: I have the multiple documents with nested documents array in the collection, need a result group by ...
1
vote
1answer
25 views

How to convert a datefield from string to date?

Here is the query that I am using. What I need to extract is the data for the last 10 minutes. But no records found is the output for this query, I think this is due to the type of data that were ...
-1
votes
0answers
5 views

what built role i can choose while creating a user to connect my mongoDB instance for running mongosqld service [closed]

i am setting up mongosqld service to connect to my mongod server. for this i am creating a user just to be able to perform task required for Mongosqld service. i am looking for some suitable built in ...
1
vote
1answer
19 views

MongoDB sharding multiple collections with the same shard key

Lets imagine I have two mongodb sharded collection: likes & comments. Both collections are sharded, both collections have userId as a sharded key. Lets imagine that likes collection is huge and ...
0
votes
1answer
23 views

MongoDB admin user cannot access system.views collection

One of our MongoDB databases contains a collection called system.views and I cannot find any information for this collection in Mongo Doc: https://docs.mongodb.com/manual/reference/system-collections/...
1
vote
0answers
17 views

Efficient way to store geographical routes in MongoDB

I need to store a taxi route into MongoDB, however I'm not sure what is the best way to do this. Since the route is only needed for the taxi order, the first idea I had is to store it in the order, ...
0
votes
1answer
25 views

Solution for a readonly copy of a standalone MongoDB server

I store some data in many databases/collections on a standalone MongoDB server. This server is used for production. I need to access those data (or at least nightly build data, and not all databases/...
0
votes
0answers
9 views

How to db.collection.watch() aggregated by fields and operationType?

I would like to watch the change stream of a collection, but filter it by operationType (insert, delete) and some fields. collection.watch( [{ $match: { 'fullDocument.name': 'Dave' } /*{ ...
1
vote
0answers
206 views

Exception; Collection does not have UUID in KVCatalog

I have installed Mongodb 4.2 through this guide] and when running sudo service mongod start|restart It does not start the server and I have the log below in mongod.log file. Exception in ...
1
vote
0answers
430 views

Failed to start of service MongoDB community4.2 using Homebrew in Mac OS Mojave 10.14

Error message while starting the mongoDB service. Error: Permission denied @ rb_sysopen - /Users/syedahmed/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist I installed/reinstall the ...
0
votes
0answers
6 views

How to get records from one collection based on role hierarchy assigned from another collection in mongodb using $graphLookup aggregation

I have a roles collection whose schema is like this : { name:String, parent:{type:Schema.Types.ObjectId, ref:"role"} } it has 3 documents right now as shown below { "_id": "...
1
vote
0answers
27 views

mongorestore Failed: an inserted document is too large

I have my remote mongodb database backed up and downloaded it to my local machine at /var/www/mongobackups3/ So I do this to insert/ restore it to the mongodb in my local machine: $ mongorestore /...
0
votes
0answers
16 views

Mongodb C-driver install fail on windows

when build c-driver libbson, I have a CMake error C:\mongo-c-driver-1.15.0\src\libbson>cmake -DCMAKE_INSTALL_PREFIX=C:\mongo-c-driver -G "Visual Studio 14 2015 Win64" CMake Warning: No source ...
1
vote
0answers
18 views

MongoDB thinks it's not on XFS despite being on one

From what I can understand/read it should suffice to have the filesystem as XFS and the dbpath set to a folder on that disk. What else do I need to do to fix this? I moved the whole db folder from the ...
1
vote
1answer
22 views

Design datastore persistence based on state of the Entity

I have an entity Content to persist in the database. The entity has an attribute LifeCycleState that denotes the present state of the content. For the sake of elaborating further, assume we have ...
1
vote
0answers
15 views

How to scale MongoDB/GridFS for fast ingestion on limited timescale

I'm working on a cloud-agnostic service which must allow the ingestion of a lot of media files in a very limited timeframe. Some numbers: 3-4 hours total of workload: the service will be active ...
0
votes
0answers
11 views

Unable to connect with MongoDB when giving mongod command in Cli

I'm trying to install mongoDb on centos VM and followed few sites like https://linuxize.com/post/how-to-install-mongodb-on-centos-7/ , https://www.digitalocean.com/community/tutorials/how-to-install-...
0
votes
0answers
40 views

Show Collections in MongoDB throwing

I am connecting to MongoDB hosted on EC2 instance of AWS. I am connecting through ssh command. Upon entering the command "show collections", I am getting uncaught exceptions. Please see the sequence ...
2
votes
1answer
37 views

Is searching faster if indexed values are the same?

Currently I have a collection events with an attribute createdAt of type date (for example 2019/09/09 10:32:12.123). Because my users search a lot by date, I added an index on this attribute. There ...
2
votes
1answer
24 views

How to set a correct value for wiredTiger concurrentTransactions

I have a single instance in server with 7 Processor and 15 Gb. In value default for wiredTigerConcurrentReadTransactions and wiredTigerConcurrentWriteTransactions is 128. But is value default, how to ...
1
vote
0answers
18 views

Schema design: Anonymous user's data across registration

This is a schema design question; implementation is going to be Mongo, but answers are platform agnostic. Given an app, which has users, sessions, and items. All visitors will have a session ...
0
votes
1answer
28 views

MongoDB restoring to existing replica set (avoid creating a new one)

I have a MongoDB cluster runnning on 3 AWS EC2 instances, 1 for primary and 2 secondary nodes. I'm trying to perform a backup and restore without having to recreate the replica set. mongodump seems a ...
0
votes
0answers
28 views

MongoDB replica set in swarm gets very slow when one node is down

I created a 3 nodes replicaset with mongodb that I host in a swarm environment. To do so, I created 3 services mongo1, mongo2, mongo3 with the same configuration. When I challenged the resiliency of ...
0
votes
1answer
13 views

Mongodb Index not used in case of $or query

I have added created a collection first and created index db.first.createIndex({a:1, b:1, c:1, d:1, e:1, f:1}); and inserted data db.first.insert({a:1, b:2, c:3, d:4, e:5, f:6}); db.first.insert({a:...
1
vote
0answers
12 views

does mongodb have any compiled list of non compatible functions on sharded cluster?

does mongodb have any compiled list of non compatible functions on sharded cluster? I was looking for a compile list of non compatible functions on sharded clusters, so we can anticipate the changes ...
0
votes
0answers
17 views

MongoDB insert data if not exists and update only the array if exists on large amount of documents

So I have about 1M records to first insert and then subsequently update an array in them whenever I run the script. A typical record { "_id" : Object(), "id" : "my_unique_id", ...
0
votes
1answer
9 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
0answers
22 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
1answer
42 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 ...
0
votes
0answers
19 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 ...
0
votes
1answer
21 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
2answers
42 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
0answers
25 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 ...
0
votes
1answer
30 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
60 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
27 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
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 ...
1
vote
1answer
24 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
22 views

MongoDB Server Log to file and rsyslog

I have to forward my logs to rsyslog via UDP, but due to the volatile nature of UDP and rsyslog I would like to also log to a file. However, AFAICT MongoDB only allows one target for its logs: ...
2
votes
1answer
23 views

mongorestore from multiple dumps

I have a mongo-database where existing entries never change but new entries are added every day. I have ~1000 dumps, each is the new data that was added on the corresponding day. I.e. I have the ...
0
votes
1answer
32 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....
0
votes
0answers
53 views

mongodb keyfile permission denied

I configured in /etc/mongod.conf to enforce keyfile access control, in security option enabled, keyFile is /root/dbtest.key (the absolute path of keyfile). I already gave the ownership to mongodb user ...
0
votes
0answers
15 views

Backup and restore a subset of a mongo collection that includes all the GridFS references and related document?

I have a big collection in MongoDB GridFS database. How can I backup a subset of the collection by date filter and all the GridFS related collection in the chunks, files and gridfs bucket will be ...
0
votes
0answers
14 views

run cleanupOrphaned in a loop do not remove all orphaned documents from the shard

MongoDB v3.4.1, run cleanupOrphaned in a loop do not remove all orphaned documents from the shard,is there any prob? 1.use mongoshake migrate mongo sharding ,there is duplicate error ,key is _id ...
0
votes
0answers
15 views

Remove linked GitHub Repository from Mongo Stitch

MongoDb stitch is providing the continuous integration choice to maintain our stitch entities. For the testing, I have linked the sample repository to the stitch app's Deploy option. Now, I just want ...