175,447 questions
2 votes
2 answers
69 views
MongoDB to Oracle insert runs in reverse date order
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, ...
1 vote
0 answers
50 views
MongoDB Go Driver v2: How to Marshal a Nil Custom Type as BSON Null?
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":...
Tooling
0 votes
0 replies
50 views
How to convert javascript object of mongodb based query to mongodb query as parse
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 , ...
0 votes
0 answers
34 views
MongoDB/Pymongo giving random ServerSelectionTimeoutError messages
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 ...
-3 votes
0 answers
28 views
Express.js: "Cannot set headers after they are sent to the client" error with MongoStore sessions - page renders correctly Error [ERR_HTTP_HEADERS_ERR [duplicate]
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 ...
0 votes
0 answers
44 views
Mongoose model throws validation errors even though payload is correct — document still gets created on first error
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 ...
0 votes
1 answer
41 views
MongoTimeoutException in Testcontainers Integration Test : Open Liberty app attempts to connect to Kubernetes FQDNs instead of local alias
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-...
0 votes
2 answers
57 views
Can't connect to MongoDB Atlas (free tier)
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 ...
2 votes
1 answer
79 views
How to reduce logging level in mongodb/mongodb-atlas-local [closed]
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 ...
3 votes
1 answer
77 views
Mongodb timeseries collection can't query far far future records
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....
Advice
1 vote
2 replies
69 views
Connecting to Mongodb from inside Docker container
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 --...
Advice
0 votes
1 replies
35 views
Is Mongoid 9 compatible with MongoDB 8.2?
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 ...
5 votes
1 answer
231 views
.NET 9 -> .NET 10: MongoDB query using array.Contains throws NotSupportedException
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 ...
Best practices
0 votes
1 replies
55 views
Mongodb Using aggregates for advanced search
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 ...
2 votes
0 answers
67 views
MongoDB 8.0: StaleDbVersion triggers shard-local majority write after step-up; fails with 2 data + 1 arbiter when one data pod is down [closed]
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 ...