Skip to main content

Questions tagged [mongodb]

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

Filter by
Sorted by
Tagged with
-1 votes
1 answer
50 views

Database Design for Attendance Management

Although this question has been asked many times on stackoverflow but none of them fit my situation. I have an application which possibly going to have 2-3 million student records. Each student is ...
KAVYA SHARMA's user avatar
0 votes
1 answer
17 views

MongoDB createIndex compound unique index on array field

I'm trying to create a unique index in MongoDB that enforces uniqueness based on the existence and non-undefined nature of a field (barcodes) in my skus collection. Here's the index creation query I'm ...
Brainfuck's user avatar
0 votes
1 answer
29 views

Removing mongoDB from MacOS

I need to delete all mongoDB thing in my mac. i followed the uninstall guide on mongoDB uninstall official guide but on step 2 which is `launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb-...
antisuri's user avatar
0 votes
0 answers
18 views

How to transfer precomputed mogodb index to another machine?

I have a local mongodb database that i want to transfer to a free tier aws ec2 t3.micro instance. The problem is that one collection in the db is a bit larger(1.2 GB, 24M docs), so there is no way i ...
user avatar
1 vote
0 answers
24 views

Taking full and incremental backups with authentication in MongoDB

We have a multi-tenant micro-service (it's basically kafka with some bells and whistles). We are using Mongodb to store multi-tenant credentials and kafka data so the authentication is really tight. ...
DarkDead's user avatar
0 votes
1 answer
18 views

How to rename hostname in a Mongodb replica set

I need to know how I can rename my hosts belonging to my replica environment in mongodb, I currently have the following configuration: rs.conf() { "_id" : "myreplicaset01", ...
miguel ramires's user avatar
0 votes
1 answer
25 views

Install MongoDB on a drive other than C

During the installation of MongoDB Community 7.0 the installer asks for the paths to the DB, and I point them at the dedicated, 50GB empty drive E:, which was created specially for MongoDB. The next ...
Betty Liv's user avatar
0 votes
0 answers
39 views

Limit MongoDB Database Size/Quota

I'm running the latest version on Docker(Mongodb server 7.0.11), and I'd like to know: Are there any mechanisms to limit the size of a single database on MongoDB? Or perhaps a way to impose a storage ...
Jerome Guenon's user avatar
0 votes
0 answers
11 views

In MongoDB sharded env one shard cluster is in 4.2 other 2 shard cluster is on 4.4

We have MongoDB sharded env in k8s having three shard clusters each having three nodes, out of three clusters one cluster is on the 4.2 version and others are on the 4.4 version. How I can upgrade 4.2 ...
user avatar
0 votes
1 answer
40 views

How to Create a Case-Insensitive Unique Compound Index in MongoDB?

How to Create a Case-Insensitive Unique Compound Index in MongoDB? Question Body: I'm trying to create a compound unique text index in MongoDB with the following fields: tenant_id: 1 seller_id: 1 ...
Brainfuck's user avatar
0 votes
1 answer
27 views

If SSTable sorted, why do we need Sparse Index?

As far as I know, when we create clustered index it restructures the table in B-Tree form and uses binary search when we try to find particular row. SSTable is also sorted by key. Why do we need ...
Shamil's user avatar
  • 3
0 votes
0 answers
12 views

Is it possible to add a node which does not have private network connectivity with other nodes?

I have a 3 node replicaset setup Both have private connectivity with each other and resides on same DC (DataCenter1) 10.1.0.1 - Primary 10.1.0.2 - Secondary We are planning to have another ...
JRA's user avatar
  • 149
0 votes
0 answers
14 views

Setting log level for MongoDB

I am looking to set log level to Error(E) for all the components except for the control component which should have the log level set to Informational(I). Also, I would like to log slow queries which ...
user avatar
0 votes
0 answers
32 views

Mongo DB slow deletes due to indexes rebuild , same with TTL indexes

We are having huge collection which we can not partition ( we need to get the records by last updated time which can not be known ). To decrease the storage we have enabled TTL index based on last ...
Yulian Oifa's user avatar
0 votes
0 answers
29 views

MongoDB losing / reverting some data

Not quite sure how to handle this. Not even sure it belongs here. Long story short, I have a MongoDB instance (6.x) running on Win10. Sometimes, the DB returns some missing values for a document. Also ...
user avatar
0 votes
1 answer
33 views

Mongo 3.6 doesn't utilize compound index to avoid in-memory SORT, and 3.4 does

I'm currently experimenting with upgrading mongo, comparing performance of different mongodb versions and stumbled into a curious anomality when upgrading from 3.4 to 3.6. I have a relatively large ...
glock18's user avatar
  • 101
0 votes
0 answers
12 views

MongoDB - optimizing compound index by using executionStats

I am visiting the MongoDB learn DBA course. In one of the labs, it was shown how to optimize the compound index by examining the explain plan. The lab used the sample training dataset. Following query ...
ray's user avatar
  • 126
0 votes
1 answer
18 views

Why is my 4-node replicaset setup is not working?

I have a 4 Node setup which is being hosted On-Prem by 2 Host Servers (DC1, DC2) 192.168.0.1 - Primary (Located in DC1) 192.168.0.2 - Secondary (Located in DC2) 192.168.0.3 - Arbiter (Located in DC2) ...
JRA's user avatar
  • 149
0 votes
1 answer
46 views

Mongod starting issue on ubuntu

When I try to check the status of mongodb I get the following: × mongod.service - MongoDB Database Server Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled) ...
Rime Tazi's user avatar
1 vote
1 answer
22 views

How to mongodump collection with x days behind?

I'm trying to mongodump one specific collection but I need only 90 days behind. I'd to accomplish something like this: db.collection.countDocuments({dateStart:{"$lt" : Date.now() - 90*24*60*...
Tadeu Bernacchi's user avatar
0 votes
0 answers
18 views

MongoDB Schema Design for Branch-Specific Flower Customization without Disrupting Original Data Flow

Description: I'm working on a MongoDB schema design for a flower shop application where flowers are managed at both the company (flower type) and branch (flower) levels. Each flower type is defined at ...
user avatar
0 votes
1 answer
112 views

MongoDB Delete old data

We want to clear our Mongo of old records (older than 90 days), we have a replica set with 3 nodes and we have 3.8 terabytes of data (in /var/lib/mongodb) on each node We want to clear old records ...
Joom187's user avatar
0 votes
1 answer
17 views

Hi , Need support to decompose Mongo DB dump - > Then re-construct that again

I am taking Mongo DB Dump from a production server where we have some limitation on file size which can be transferred from production to local environment. So we are planning to 1)Take Mongo DB Dump ...
Bibaswan Sarkar's user avatar
0 votes
0 answers
13 views

Zero Access Encryption on AWS, Azure or Google Cloud possible with MongoDB?

I'm having a question about the following: is it possible in general to store data on a cloud platform, specifically either AWS, Azure or Google Cloud, without the cloud provider itself being able to ...
User2363562's user avatar
0 votes
1 answer
29 views

Testing a BinData field by $bitAllSet with an offset and size limit in MongoDB

Assume I have a BinData field of arbitrary length that stores n-byte items. The offset of each item is known before the query and all items are n bytes. I want to test an item at offset X with bitmask ...
Michael Sazonov's user avatar
0 votes
1 answer
35 views

Sharded Cluster - Why does my data not splitted among nodes?

I created a cluster with two shards. Or so I thought. In my design, first server has mongos_router shard1 (3 nodes) and config servers. Second server only has shard 2 nodes. After I configured shards ...
Furkan YIlmaZ's user avatar
1 vote
1 answer
29 views

Mongo Preventing access to dangerous command

Reading Mongo: Definite guide: In first chapter, author mentions the following snippet to change some of the default commands of db: var no = function() { print("Not on my watch."); }; //...
Cody's user avatar
  • 123
0 votes
0 answers
19 views

mongod --storageEngine=mmapv1 is failing

Just started learning MangoDB with the above command which is failing and giving below results. mongod --storageEngine=mmapv1 Please help me to fix this issue and proceed with my learning and ...
Kavi Kavitha's user avatar
0 votes
0 answers
23 views

When is it most appropriate to use relationships rather than direct embedding in MongoDB?

I'm currently attempting to write some data on MongoDB to store character data, stuff like their name, description, etc. until there it's fine. But I run into situations where to me it's logical to ...
Blastcore's user avatar
  • 103
0 votes
0 answers
30 views

MongoDB movePrimary doesn't work when the primary shard is down

We have a sharded cluster with several collections sharded. There are two collections that cannot be sharded because there is a unique index on the collection. So these two collections are on the ...
user2704732's user avatar
0 votes
1 answer
21 views

How to setup mongo synchronization with only two nodes?

Im trying to install two nodes of mongo, each one locates in a different location with low latency. The architecture should be: One node in DC, and the other node in DR. It is supposed to be only one ...
MiH's user avatar
  • 125
0 votes
0 answers
35 views

Handling feed and feed subscriptions with document database

I have a data feed that contains channels that users can subscribe to. It's similar to Facebook or LinkedIn where each channel is a topic and users can subscribe to as many channels as they like and ...
Sam's user avatar
  • 113
0 votes
1 answer
35 views

MONGO_FDW on Postgres user privileges

Setting up MONGO_FDW in Postgres for the first time. First step is to add the extension after connecting as the default postgres user: CREATE EXTENSION mongo_fdw; The application user is app_user, so ...
TenG's user avatar
  • 103
0 votes
1 answer
18 views

MongoDB composite shard key including timestamp write behavior

I am investigating MongoDB's appropriateness for our use case. We have clients that generate log data, and most of our use cases for this DB involve querying by Client ID and a time range of when the ...
threewordphrase's user avatar
0 votes
0 answers
67 views

MAMP PRO 6.9, PHP 8.2.0, Mac 14.21 and Mongo DB - Apache Fails

Have been trying to get MongoDB installed on MAMP PRO 6.9, PHP 8.2.0, Mac 14.21 via PECL but after a successful install and enabling the extension, when restarting MAMP Pro, Apache fails and none of ...
Nigel McLaughlin's user avatar
0 votes
0 answers
33 views

Custom directory for mongodb data

I specified a different directory for my mongodb data in the mongodb conf file: # Where and how to store data. storage: dbPath: /home/psr/data/mongodb # engine: # wiredTiger: # where to write ...
Prabhjot Singh Rai's user avatar
0 votes
0 answers
37 views

The backup I took with mongodb mongodump is extremely slow

I am using mongodb 7 community version. And I have a system that inserts a lot of log documents. Since I am using the Mongodb community version, I cannot use the ops manager tool used in Mongodb for ...
emreyanik's user avatar
0 votes
0 answers
25 views

Loops not allowed on MongoDB Relational Migrator

Hi I'm trying to use MongoDB Relational Migrator to migrate my postgreSQL DB to MongoDB but I'm getting this message when I try to create a data migration job Error building job context: loops not ...
user2782149's user avatar
0 votes
0 answers
114 views

MongoDb Timeseries Data at high Load Causes Cache Pressure in Time

I'm encountering cache pressure issues in MongoDB, leading to early termination of buckets in my time series collections within a single database. Here's an overview of my system setup and the ...
Çağatay Erem's user avatar
0 votes
1 answer
69 views

MongoDB: What cause bytesRead in insert operation?

Recently we had high CPU/Memory and I/O usage on our MongoDB. While checking the logs all I found is some insert during this period. While inspecting logs I noticed most of the insert logs have ...
mediocre's user avatar
  • 168
0 votes
0 answers
43 views

Bitnami mongod fails with 'MongoServerSelectionError'

Bitnami's Mongo image launched under virtualbox works and brings up the text console (debian11 so no X11). Debian instance starts the listener correctly according to ss -atpn. But starting mongosh ...
ArrowInTree's user avatar
0 votes
0 answers
34 views

Document Database Relationship design

I am trying to convert a relational MySQL database into a document database, as a mandatory school assignment. As shown in the ER diagram the idea of the SQL database is that a user can be registered ...
Soma Juice's user avatar
1 vote
0 answers
82 views

Why MongoDB index size is different between servers

emphasized textI imported essentially the same dataset into two different MongoDB instances, both running the same version (5.0.24). One is a single node, and the other is a replica set managed by a ...
antoine.lange's user avatar
0 votes
0 answers
32 views

I am able to login using server, client and x509 authentication in MongoDB community edition

I am trying to configure x509 authentication for mongodb community edition. Though I have configured the same, I am able to login using server as well as client authentication along with x509 auth. Is ...
dheepakraj govindarajan's user avatar
0 votes
0 answers
38 views

MongoDB WiredTiger History Store File Growth Observed During Failover

We are currently undergoing a migration from MongoDB version 4.4 to 5.0, and during this process, we have encountered some intriguing observations that deviate from our anticipated outcomes. Despite ...
user202752's user avatar
0 votes
0 answers
23 views

Mongodb speed up new shards balancing

We have huge collections ( around 3.5 TB ) that is sharded with 2 shards on mongodb. Since the collection is growing and load is getting increased on existing shards we decided to add 2 new shards for ...
Yulian Oifa's user avatar
0 votes
0 answers
157 views

MongoServerSelectionError: Client network socket disconnected before secure TLS connection was established on GKE Autopilot workload

We are in the process of migrating from CloudRun to GKE Autopilot. We have the same exact environment variables and the LoadBalancer service for the workload has the same port configuration as the ...
ift-436t's user avatar
0 votes
1 answer
77 views

How to check mongodb time series collection shard distribution

[direct: mongos] test> db.weather.getShardDistribution() MongoshInvalidInputError: [SHAPI-10001] Collection weather is not sharded we are getting this error and how to check the sharded collection ...
user avatar
0 votes
0 answers
44 views

Practices to maintain historical data via replication?

We have a use case like of banks, where we generate large number of transactions, say in transaction table and few other tables with large number of inserts, every day. Transactions are most inserted ...
Sachin Verma's user avatar
0 votes
0 answers
14 views

Getting this exception in MongoDB Failed to completely discover replica set appdbRS

There is a problem with the address: address=om-3- proud-toad.mdbtraining.net: there is no space after '3-' CAN ANYONE TELL WHERE CAN I CHANGE THE ADDRESS? 2024-01-05T13:13:58.938+0000 [DiagnosticsSvc-...
datascinalyst's user avatar

1
2 3 4 5
49