Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
40 views

I'm working with MongoDB transactions (Node.js, replica set). Inside a transaction, I update a document in a way that changes the value of a field that is covered by an index. Later in the same ...
Bear Bile Farming is Torture's user avatar
Tooling
0 votes
2 replies
33 views

My mongo database is contained in a docker image. I use this command in order to run the docker container: docker run -p 127.0.0.1:27017:27017 mongo:Version and afterwards I do a mongorestore: ...
quma's user avatar
  • 5,797
0 votes
1 answer
63 views

I'm not sure if this is a MongoDB issue, an issue with the mongo-java-driver or if I'm doing something worng. The issue is that MongoDB can behave differently in case there is a $eq operator or if a {...
the's user avatar
  • 361
2 votes
2 answers
85 views

I have Python code in which I am reading data from MongoDB and insert it into a table in Oracle database. I have removed some parts of the code (importing libraries, connecting to MongoDB and Oracle, ...
Pantea's user avatar
  • 143
1 vote
1 answer
77 views

I’m using MongoDB GoLang Driver v2 and I want to store a custom money type in MongoDB. If the value is nil, I want the BSON document to store price: null. Example document I want: { "name":...
Prakash P's user avatar
  • 4,128
Tooling
0 votes
0 replies
50 views

So I have an MEAN stack application where user types query ( or copy from mongodb compass ) in a editor and I use nodejs in backend to perform that query , So I use codemirror editor to text codes , ...
Vignesh's user avatar
  • 61
0 votes
0 answers
50 views

I'm using mongo db with payloadcms and I have tree like structure. We have a collection called nodes. A node have children as array and a parent id. Now I want to change the node status like marking ...
Shoaib Ahmed's user avatar
0 votes
0 answers
34 views

We're using Tornado-based services, which fork and then create DB connections. This was all working fine until we tried upgrading to python 3.11 (from 3.8) and using pymongo 4.8.0. Now, we very ...
kbosak's user avatar
  • 2,127
-3 votes
0 answers
29 views

I'm getting the error Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client in my Express.js application using MongoDB session store, but the page displays correctly in ...
Priya Singh's user avatar
0 votes
0 answers
53 views

I'm building a guest creation API using Next.js (App Router), Zod, and Mongoose. The problem: Even though my frontend validation passes and I see the full payload in the console, the server throws ...
Mugi Raja's user avatar
0 votes
1 answer
43 views

Title - MongoTimeoutException in Testcontainers Integration Test : Open Liberty app attempts to connect to Kubernetes FQDNs instead of local alias I am writing integration tests for an Open Liberty-...
VR7's user avatar
  • 112
0 votes
2 answers
58 views

I'm struggling to connect from my Rails deployment to an Atlas Cluster. This is my MONGODB_URI: mongodb+srv://JohnDoe:****@cluster0.*****.mongodb.net/XYZ_prod?retryWrites=true&w=majority The ...
Thomas's user avatar
  • 78
2 votes
1 answer
80 views

Problem: I'm using the mongodb/mongodb-atlas-local Docker image in our CI/CD pipeline for running tests. While the verbose logging is acceptable for local development, it becomes problematic in CI/CD ...
Dmytro D's user avatar
3 votes
1 answer
78 views

Mongo can't bring records which are in far far future like 2394-10-20T16:10:23 now: 2025-11-17 Description: I have a timeseries collection in mongo and here is the command to created it: db....
zamoosh's user avatar
  • 119
Advice
1 vote
2 replies
70 views

I want to connect to my mongodb running on my localhost machine (dockerhost) from inside a docker container. For that I have to allow connections other than localhost. Unfortunetly when using --...
Benedikt Lechner's user avatar
Advice
0 votes
1 replies
37 views

Looking at the compatibility page, MongoDB 8.2 isn't listed as compatible. In practice, I suspect this page is updated less often than it should be, so I wonder if Mongoid is actually fully compatible ...
take's user avatar
  • 328
5 votes
1 answer
242 views

After upgrading from .NET 9 to .NET 10, a MongoDB query that used to work now throws a System.NotSupportedException during query execution. I'm looking for pointers whether this is a runtime change in ...
mrcode's user avatar
  • 567
Best practices
0 votes
1 replies
57 views

Trying to solve a conundrum I have in writing some queries. I’ve traditionally used simple find operations (and cursor operations for paging functionalities), but need something more complex to ...
Snappawapa's user avatar
  • 2,082
2 votes
0 answers
67 views

Environment Deployment: Kubernetes (RKE2), Bitnami MongoDB Sharded Helm chart MongoDB: 8.0.8 mongosh: 2.5.0 Topology: Config servers: 3 (CSRS) Mongos: 3 Shards: 3 shards total; each shard is a replica ...
Srinath Chamarthi's user avatar
1 vote
1 answer
54 views

Problem Starting November 10th, my Jest integration tests began failing randomly with MongoDB connection errors. The tests use @testcontainers/mongodb v11.5.1 and mongodb v8.0.12. Error: ...
hiddenhenry's user avatar
0 votes
0 answers
55 views

I am running a MongoDb atlas M20 instance which should have a maximum of 1500 connections in its pool. It has 1 primary and two secondaries. If I look at the server stats I can see the connections are ...
johnstaveley's user avatar
  • 1,497
2 votes
0 answers
56 views

I am running a data ingestion ETL pipeline orchestrated by Airflow using PySpark to read data from MongoDB (using the MongoDB Spark Connector) and load it into a Delta Lake table. The pipeline is ...
Tavakoli's user avatar
  • 1,433
0 votes
0 answers
57 views

I updated my backend deployment (Flask app) with a new feature not related to database logic, and suddenly MongoDB Atlas connections no longer work. Before the update, everything was fine. Local ...
SOEUNG Phearaneron's user avatar
2 votes
1 answer
85 views

I'm trying to implement a robust search function in my NestJS/Mongoose application that can handle partial matches while being case-insensitive and diacritics-insensitive (ignoring accents). My ...
Steeven Delucis's user avatar
0 votes
0 answers
24 views

I've a docker-compose, that declares 2 services, a mongo bd and a python scripts. If I run this docker compose up it works fine. services: mongo: image: mongo:7.0 container_name: mongo_db ...
hcarrasko's user avatar
  • 2,352
0 votes
2 answers
58 views

I'm building a strongly-typed generic MongoDB repository in TypeScript (using the official mongodb driver, v6.x). I want to compose filters dynamically using $and, but the TypeScript type system keeps ...
chyVacheck's user avatar
0 votes
0 answers
28 views

When using the $vectorSearch aggregation stage and specifying filter, using the $exists operator isn't supported, but another way of effectively doing the same thing is to check if the property value ...
charskiee's user avatar
0 votes
1 answer
60 views

I am trying to read data from MongoDB in Spark 4.0.1 using the MongoDB Spark Connector (version 10.5.0). My PySpark code looks like this: from pyspark.sql import SparkSession spark = SparkSession....
Tavakoli's user avatar
  • 1,433
Best practices
1 vote
0 replies
33 views

Using the "MongoDB Kotlin Driver" is there any best practices to define the data model? Particularly regarding the _id vs id while sharing the same data model to serialize through different ...
Benoit's user avatar
  • 1,921
0 votes
1 answer
105 views

I use MongoDb in C#. Shown below is an object I want to clone, but also I want to merge it into the same collection. This is a simplified version of the document I use: class MyDocument { public ...
ugurg's user avatar
  • 1
3 votes
1 answer
58 views

exports.getAllProducts = async (req, res) => { try { console.log(req.query); const queryObj = { ...req.query }; const excludedFilters = ["page", "limit", "...
ahmad fakher's user avatar
3 votes
2 answers
118 views

I'm getting an error in my mongodb aggregation pipeline with the $regexMatch operator. I'm trying to match fields that contain ISO date strings and convert them to a different format. Here's the ...
GrapeAllergy's user avatar
0 votes
1 answer
57 views

Take the following Mongoose schema. const userSchema = mongoose.Schema({ username: { type: String, required: true, unique: true, minLength: 3 }, name: ...
Ahmad's user avatar
  • 10
3 votes
1 answer
92 views

Summary Running Django migrations against our MongoDB database does not create MongoDB collections or indexes as defined in our app. The command completes without errors, but no collections or indexes ...
Neeraj Verma's user avatar
0 votes
0 answers
74 views

I'm kind of new to mikro-orm, trying to wrap my head around as how to correctly define the relations between some of my entties in my collections. The idea is to store all my pre-defined modules in ...
Alexus's user avatar
  • 1,962
0 votes
0 answers
74 views

I want to deploy an app on Kubernetes with Helm. This app is composed of multiple parts, 2 of them are a Spring backend and a Mongo database. I want to deploy theme in 2 pods and have them talk with ...
Cameron's user avatar
  • 11
0 votes
0 answers
54 views

I have a collection migrationTest in MongoDB with a unique index for the message field. In my migration I'm inserting documents to this collection and in one place I'm using the existing message to ...
maksim's user avatar
  • 498
0 votes
1 answer
116 views

I have been experiencing slow mongo queries suddenly. The execution times varies very randomly. Initially I was suspecting this expensive aggregation operation :- { "appName": "XXXXXX&...
LEO_007's user avatar
  • 51
4 votes
2 answers
90 views

The BSON Timestamp type, documented here https://www.mongodb.com/docs/manual/reference/bson-types/, includes a 32-bit time_t field. Does anyone know whether this field is signed or unsigned? If signed,...
DaddyLongToes's user avatar
1 vote
2 answers
57 views

I have Model with a deeply nested attribute: $model = Model::create(); $model->nested_prop = ['foo' => ['bar' => ['x' => 1]]]; $model->save(); In another method I want to modify a ...
flappix's user avatar
  • 2,259
3 votes
2 answers
149 views

I'm encountering an issue in a Go application that uses the official MongoDB Go driver. We have the use case where a ReplicaSet is recreated from scratch. Replica Set consists of 2 members, no arbiter ...
Isaac's user avatar
  • 31
3 votes
0 answers
104 views

I'm facing a counter-intuitive performance issue with my MongoDB sharded cluster where queries with fewer values in an $in clause are significantly slower than queries with more values. The Issue: ...
9308's user avatar
  • 31
2 votes
1 answer
80 views

I am new to programming (and NextJS) and I'm building a NextJS app, using Mongoose for my MongoDb connection. I was wondering if I should close the connection after each query? Right now I am just ...
Alex's user avatar
  • 13
0 votes
0 answers
62 views

Disclaimer: There are a couple of questions for this exact exception, sadly none of those match my environment or circumstances (thus i think this question is unique) In my case i have a: working ...
Eugen Mayer's user avatar
0 votes
0 answers
69 views

I'm currently trying to create the model using nestjs mongoose schema, and i want to convert the mongodb data from snake case to camel case in my schema layer like this: export type ...
Izukishi's user avatar
0 votes
1 answer
59 views

I have 4 members in my replica set: { _id: 'mdbDefGuide', version: 16, term: 63, members: [ { _id: 2, host: 'localhost:27019', arbiterOnly: false, buildIndexes: ...
walruz's user avatar
  • 1,386
0 votes
1 answer
53 views

i have some problems in production using mongo We have python using mongo and mongo-express for ui. And we are facing performance issues, after research i found db.currentOp() to see queries which are ...
Zesshi's user avatar
  • 524
0 votes
2 answers
75 views

I have a MongoDB collection with documents containing an array of subdocuments. For example: { "_id": 1, "addresses": [ { "city": "New York", "...
Bear Bile Farming is Torture's user avatar
1 vote
0 answers
47 views

Say I have a document in a Mongo collection that looks like the following: { "_id": "01:550204", "somefield1": "someValue1", "somefield2": "...
djsumdog's user avatar
  • 2,828
0 votes
2 answers
180 views

I am running my backend using mongodb and express. I am restarting the server using nodemon. After running: npm run dev I am getting the error below: > [email protected] dev > nodemon server.js [...
Ambagwa Eugene's user avatar

1
2 3 4 5
3509