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

Multi-tenant reduce number of MongoDB connections

Our multi-tenant app has about 4000 databases per tenant and we are having a problem with performance because of too many connections. Creating MongoDB connections on each database is a heavy ...
0
votes
0answers
15 views

Compare a document against millions of other documents to find similar documents [closed]

I am trying to implement a feature to compare a document against millions of other documents to find if the input document is similar to any of the existing documents I already have in the SQL Server ...
0
votes
1answer
42 views

mongo user can not connect from bash on localhost

In mongo shell, I ran the following commands: use mydatabase db.createUser( { user: "john", pwd: "mongopass", roles: [ "readWrite", "dbAdmin" ] }); Mongo ...
0
votes
2answers
31 views

MongoDB - _id as String instead of ObjectId ? Relationship between collections or duplicate data?

Scenario: An entity called 'accessPoint' has an important attribute called 'network'. The application will display some parts of this network attribute, so I decided to store it inside accessPoint ...
0
votes
1answer
11 views

When and how to create users in a MongoDB sharded cluster

I hope my question is clear enough. I'm setting up a sharded cluster, 3 members, each running as a replica set. So, on each shard there are 3 mongod running as replica sets. My question is what ...
0
votes
2answers
29 views

MongoDB cross datacenter replication without elections or high data availaility

I want to replicate a MongoDB database to another node, located in another datacenter. This is to help guard against data loss in the case of a hardware failure. We don't want/need high availability ...
0
votes
1answer
25 views

Is there any way to disable MongoDB's cache?

I'm not getting recent data when querying, and I believe it has to do with cache. Probably, MongoDB's cache invalidation fails somewhere. I'd like to disable it completely and I don't care about ...
0
votes
0answers
26 views

Mongodb Upgrade from 1.8.2 to 4.4

I would like to upgrade Mongodb version 1.8.2 with replica set available ( 1 primary, 2 secondary) with same version to version 4.4 with no downtime. What are the steps do I need to follow in order to ...
2
votes
0answers
15 views

MongoDB - 100% CPU - recovering shard (after killing updates)

Can a recovering shard (as shown below) drive CPU to 100% for hours and hours? I have killed all the queries and updates (based on db.currentOp()) and stopped the flow of new data, but the CPU stays ...
1
vote
0answers
10 views

MongoDB: Queries running twice slow on NEW server compared to OLD server

I transferred current/old running DB into a new standalone server for MongoDB. To do this, I performed the following: Took dump of data from OLD server Restored data from the generated dump into NEW ...
0
votes
0answers
12 views

Query doesn't return data that's written recently

I have two micro services where one write to DB and another read from DB. The first micro service is written in C++ while the other is written in NodeJS. When querying for data say for a IP the ...
-1
votes
0answers
21 views

mongodb query performance

I'm experiencing slow performance when testing simple queries on Mongo. Here's the context: A 8 vCPU, 16 GB RAM VM (ESXi) running Debian 10 / MongoDB Community Edition 4.4.1 as a standalone server. ...
0
votes
1answer
24 views

Config enable sharding collection in MongoDB cluster

I'm a new in MongoDB cluster. I have a question about config enable shading collection in MongoDB: I have a cluster : Shard1: replical01/node1:27017, node2:27017 Shard2: replical02/node3:27017, ...
0
votes
0answers
19 views

MongoDB MongoError: Out of memory

I have a newly installed MongoDB server running on an AWS Ubuntu EC2. The server has nothing else installed on it. The DB currently contains 35 documents of 3 MB each, meaning less than 110 MB of data....
0
votes
1answer
27 views

UserNotFound mongodb error

I know there are lot of articles with the same issue and I explored every other article trying everything and still this error persists. Here are the steps I followed: use admin. created an admin ...
0
votes
2answers
33 views

get DDL from Mongo database

I haven't done much with MongoDB. But in trying to understand the data that we do have in MongoDB, it makes sense to start with looking at the DDL in the database. What is the simplest way to pull the ...
0
votes
0answers
15 views

MongoDB 3.6 fresh install

I'm using mongodb 3.6.18 I'm running a cluster of 2 shards and 1 config replicaset. I get this error when trying to set the compatibility version to 3.6: global:PRIMARY> db.adminCommand( { ...
0
votes
1answer
15 views

Unable to add collumn in mongo

Something strange in this neighbourhood. Calling DBA's and ! GB db.getCollection('contacts').update({}, {$set: {"source": "domain.txt"}},false,true); It failed with: admin> db....
2
votes
0answers
34 views

MongoDump Failed: error writing data for collection `collection` to disk: error reading collection: EOF

[BACKUP COMMAND] mongodump --host 127.0.0.1 -d database --port 27017 --username username --password password --out /output/path/mongodump_DATE_12_00_AM [ISSUE] Failed: error writing data for ...
0
votes
0answers
24 views

Adding multiple indexes to avoid skip/limit in MongoDB

Let's say I have a MongoDB's database with millon of records having a City name, a User name and an activity. City | User | Action ------------+--------+------------------- Gotham | ...
0
votes
1answer
18 views

MongoDB - count current read/write operations

is it possible to count the current read or write operations on a mongodb replica set? (including all databases not just a single database) Thank you! Best regards
0
votes
1answer
55 views

Cannot restart or repair mongodb database after the crash (***aborting after invariant() failure) [closed]

After an unexpected crash, I can't restart or --repair the mongodb database anymore. While restarting the server with systemctl restart mongodb I am getting the following: 2020-09-16T20:25:23.835+...
0
votes
0answers
21 views

Mongodb TTL Index not expiring documents from collection

I have TTL index in collection fct_in_ussd as following db.fct_in_ussd.createIndex( {"xdr_date":1}, { "background": true, "expireAfterSeconds": 259200} ) { &...
0
votes
0answers
9 views

mongo replica is down

I have A mongo replica with 6 nodes, not sure why but 4 of them went down and two entered to recovery state. each time I tried to start the service of one of the down nodes it fails with error there ...
0
votes
0answers
4 views

Logical Sessions not closing at MongoDB 4.2 [duplicate]

How do I close my all idle connections in MongoDB as forcefully?
0
votes
1answer
20 views

Mongo Database - Dirty Shutdown

We have a major issues on our MongoDB and I've attached the latest logs and files. In previous forumns I've seen this get fixed by your team. Can you please help as soon as possible please, we are a ...
0
votes
0answers
15 views

How to show specific type record first in mongodb?

I want to show result in specific order. I have two categories on request instant and want to show instant record first. Here is my data: { "_id" : ObjectId("...
0
votes
1answer
13 views

Skewed Read Load on Mongo Replica Set

I have set up a mongo replica-set with one primary and two secondaries. The problem that I am facing is that the reads from application servers which are connecting with replica-set connection URL are ...
0
votes
0answers
8 views

Splitting existing MongoDB cluster into two clusters with minimal downtime

We have one MongoDB cluster with 3 shards. Each shard consists of 5 replicas, one of replicas is hidden. Only one very large and active collection is actually sharded, everything else is located in ...
0
votes
1answer
21 views

Is mongoexport more optimized for querying than running the same query with a driver like “mongodb” for nodejs?

I'm in charge of building a nodejs module that dumps varied amount of data from a mongodb into a file and then put it into S3 (sometimes a single document, sometimes thousands, like a whole collection)...
0
votes
1answer
91 views

Why mongod.service is killed by my system?

I am using MongoDB 4.4 version on ubuntu 20.4, using 2 mongo instances on the same server. I encountered this problem: Sep 03 10:45:25 mlnode systemd[1]: Stopping MongoDB Database Server... Sep 03 10:...
0
votes
2answers
25 views

Should I disable MongoDB balancer to prevent moveChunk to block database due to “W” lock

In my team, we have a MongoDB 3.6 with 4 shard cluster. My teammate built up Ops Manager and we found out at some point the queries are slow and they are all waiting for database level lock. "...
0
votes
1answer
16 views

What does it mean that a mongodb query has a waitingForLatch value of ReplicationCoordinatorImpl::_mutex?

Some queries that are normally fast sometimes take ages to complete. I checked currentOp() and the queries that are taking so long are waiting for the ReplicationCoordinatorImpl::_mutex latch. None of ...
0
votes
1answer
42 views

MongoDb: acquireWaitCount and timeAcquiringMicros is missing from system.profile output

I enabled profiling in a mongodb database since sometimes a query is fast while sometimes the exact same query takes a very long time, despite the execution plan being a IXSCAN. I suspect it is due to ...
0
votes
1answer
37 views

Why does MongoDB still support MapReduce, but actively discourage people from using it?

Looking at the MongoDB documentation I see that users are discouraged from using MapReduce in favour of the Aggregation pipeline. For example, on this page in the documentation. But the same notice is ...
1
vote
1answer
1k views

MongoDB start errors

I was following along a course and entered a command that was given "mongod --dbpath=data --bind_ip 127.0.0.1". In the past I had used mongo and it had worked but Im sure I had never entered ...
0
votes
1answer
9 views

Mongo - findAndModify has to be executed twice to take effect

I have a collection campaign like this: { "_id" : ObjectId("5ec12c501bd23866ef315a85"), "schemaVersion" : "1", "internalVersion&...
0
votes
0answers
4 views

Ops Manager Upgrade to 4.2

We have planned to upgrade our Ops Mgr from 3.6 to 4.2 Need to know what are all the configuration parameters and other prerequisite I should be aware of?? Should there be any change on the agents ? ...
0
votes
1answer
52 views

MongoDB not using wildcard nested array index

I have the following collection: { _id: 12345, quizzes: [ { _id: 111111, done: true } ] }, { _id: 78910, quizzes: [ { _id: 22222, done: ...
0
votes
0answers
31 views

request conversion is not supported from SQL Server to MongoDB

I'm using a Linked server from SQL Server 2012 to connect to MongoDB via BI Connector ( MongoDB Atlas ). I can retrieve some info that is int for example, but when running the query below, I receive ...
1
vote
2answers
46 views

Failed to start mongo.service on ubuntu 16.04 after update from 4.0 to 4.2

I'm trying to update my MongoDB installation from 3.6 to the latest version [4.4] on Ubuntu16.04 using apt-get. Going from 4.0 to 4.2 I faced a problem during the startup process after updating the ...
0
votes
1answer
30 views

How to create a MongoDB index with isodate?

I've create and index for a query and its running is less then 1 second to retrieve millions of rows, but as soon as I add greater than ISODATE, it doesnt use indexes anymore. the query is this one: ...
0
votes
0answers
44 views

modelling bill split app schema

I've been trying to model an efficient schema for a bill split app, the requirements are as follows: There can be groups in which there can be multiple participants, and conversations consisting of ...
0
votes
0answers
27 views

MongoDB replica after restore

I've got a PSA mongodb which I'm restoring starting from a backup made on a standalone installation. I set the PRIMARY machine in the --host parameter but the replication does not start on the ...
0
votes
2answers
78 views

Oplog incremental backup failure

I have scheduled oplog incremental dump using mongodump but it fails very often on majority of the servers. I have a shard cluster with around 200GB of oplog size defined and around 30-40 hours of ...
1
vote
1answer
46 views

mongodb removeShard issue with config.system.session

I have a staging mongodb 4.0.19 sharded cluster with 2 replica set shards . I want to remove one shard. I followed the documentation: https://docs.mongodb.com/v4.0/tutorial/remove-shards-from-cluster/...
0
votes
0answers
10 views

How do I generate the default collections from a fresh Django installation inside a Mlab database?

When I use Djongo to install the default Django installation migrations onto my local computer server's MongoDB Compass sever, the collections such as 'auth_group', 'auth_group_permissions', '...
1
vote
0answers
29 views

How to check progress with mongorestore

I'm using mongorestore to move a dump from a location to another. I've to use the quiet flag and I'm on Windows. How can I check for restore progress? Actually I can only check the size of the db on ...
2
votes
1answer
24 views

Is it safe to have Mongo replicas on single server? [closed]

I am planning a minimum setup for a low traffic discussion forum. Everybody says to use replicas because otherwise I am in a risk of data loss. I see an advantage that I can add new more powerful node ...
0
votes
0answers
15 views

Concurrent connections calculated in Mongodb Atlas

I'm considering using mongodb for a mobile backend database, and I'm slightly confused at something I haven't found an answer to in the documentation. Are the concurrent connections for each tier in ...

1
2 3 4 5
43