Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [mongodb]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
13 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
21 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
8 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
4 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
16 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
50 views

Schema suggestion for irregular time series data [closed]

Basically, I have one organisation postgers DB, where I am storing all the employee data, which contains information like name, designation, department, skills etc. High level tables as below : ...
Darshan Patel's user avatar
0 votes
0 answers
25 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
29 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
9 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
  • 111
0 votes
1 answer
12 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
25 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
0 votes
1 answer
14 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
12 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
31 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
14 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
11 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
25 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
31 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
20 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
12 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
23 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
20 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
22 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
11 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
36 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
24 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
20 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
20 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
92 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
49 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
  • 105
0 votes
0 answers
39 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
33 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
74 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
31 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
31 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
21 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
112 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
60 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
42 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
13 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 vote
0 answers
35 views

Primary MongoD hit 1M active sessions in cache

Overview We're running a sharded MongoDB cluster, using community edition v4.4. The primary mongod in one of the data shards ('shardX' for short) has hit active sessions in cache limit of 1M and new ...
user3752071's user avatar
0 votes
0 answers
41 views

MongoDB huge amount of temp files

I have a MongoDB replica set. The primary one creates a huge amount of temp files with the name extsort-sort-executor in every seconds, which generates more than 80Gb of temp files under 10 minutes... ...
SnackK0515's user avatar
0 votes
1 answer
106 views

MongoDB huge amount of temp files

I have a MongoDB replica set. The primary one creates a huge amount of temp files with the name extsort-sort-executor in every seconds, which generates more than 80Gb of temp files under 10 minutes... ...
SnackK0515's user avatar
1 vote
1 answer
122 views

What type of lock does MongoDB apply at the document level when reading or writing the document?

I’ve been reading the MongoDB documentation for hours, but I couldn’t find a clear and straightforward answer. When reading or writing a document in MongoDB, what type of lock (S, X, IS, IX) does it ...
dragonborn's user avatar
1 vote
0 answers
39 views

MongoDB: Queries running 3x slow on Azure Serverless Mongodb compared to MongoDb Atlas Free Tier server

I have a database in MongoDB Atlas using the free tier package. I recently transferred my data to Azure Serverless CosmosDB for MongoDB using mongoexport. After the data transfer, I've noticed that ...
Veli Eroglu's user avatar
1 vote
0 answers
72 views

Mongodb traffic analysis

I am experiencing very high traffic on a mongodb database, since we pay per traffic I would like to understand which queries/collections are responsible for most of the traffic to understand what we ...
tollo's user avatar
  • 111
2 votes
2 answers
57 views

MongoDB schema for visit and like

MySQL serves as our primary database, while MongoDB is employed for handling intensive write operations. I have been tasked with implementing a system for tracking visits and likes on products. The ...
BooRuleDie's user avatar
0 votes
0 answers
121 views

Reduce MongoDB memory usage

I have deployed a Mongo Community server docker in WSL Ubuntu and currently running MongoDB aggregate Query and downloading some data from Mongo. I set up the Mongo memory limit to 32 GB. However, ...
Muhammad Raihan Muhaimin's user avatar

1
2 3 4 5
49