175,420 questions
0
votes
0
answers
26
views
MongoDB and Express not communicating when using Docker Compose [closed]
When I run docker compose, every container runs correctly and there are no error logs. However, when I try running the APIs, the server doesn't seem to communicate with the MongoDB database.
compose....
Advice
0
votes
4
replies
64
views
Query MongoDB using C#
I have never queried mongoDB before using C#, usually only things like SQL Server which seem more straight forward to me. I am also not an expert in C#, so please do not beat me up. Trying to learn.
I ...
-3
votes
0
answers
27
views
MongoDB performance too slow for ycsb when I hit mongos [closed]
I have a sharded mongodb-cluster 8.0.15-ent deployed on OpenShift 4.18 as a 3 node compact cluster. Total shards - 6 , mongos -3 , config -3.
I have loaded 1.5 TB of data into this cluster. When I ...
0
votes
1
answer
76
views
Intellij IDEA: Driver class 'com.dbschema.MongoJdbcDriver' is incompatible with current JRE
I was getting this error after clicking the test connection button for a MongoDB connection in the IntelliJ IDEA Database tab:
Driver class 'com.dbschema.MongoJdbcDriver' is incompatible with current ...
1
vote
1
answer
32
views
How to partially override decoding behavior using Mongo Golang Driver v2
The timeCodec in the Mongo driver throws an error when decoding doubles into time.Time fields. I'm dealing with legacy data that stores time as a double and it's impractical for me to migrate ...
0
votes
0
answers
74
views
MongoDB Atlas queries suddenly became 10–50× slower starting Nov 21 (no code changes, Vercel functions now running for seconds)
I am experiencing a sudden and severe slowdown in MongoDB Atlas query performance.
Starting exactly on Nov 21, every API route that interacts with MongoDB became 10–50× slower.
There were no backend ...
0
votes
1
answer
59
views
MongoDB View: Merge collections with different field names using $unionWith
I am trying to merge four collections in MongoDB and create a view:
db.createView(
"manageRequest",
"claims",
[
{ $unionWith: { coll: "hr_loan" } },
{ $...
Best practices
0
votes
1
replies
62
views
How to properly structure an aggregation pipeline builder for a product catalog (filters, sorting, pagination, min/max price)?
I’m building a product catalog API using MongoDB’s aggregation pipeline.
On the Node.js side I have a TypeScript “builder” that dynamically constructs the pipeline based on filters, sorting, and ...
Tooling
0
votes
3
replies
61
views
Mongodb Docker Image with Most recent LTS Version
I am new to docker and mongodb. I am designing a database for a startup but couldn't find the image for Mongodb version(community or free) that has least amount of vulnerabilities and has LTS support ...
1
vote
2
answers
35
views
Getting an error using Payload CMS trying to connect to MongoDB that says 'unescaped characters' in username/password but there aren't any
I am using Payload CMS with MongoDB via the Terminal in Visual Studio Code. I am trying to connect to MongoDB but keep getting this error:
Error: cannot connect to MongoDB. Details: Username contains ...
Advice
0
votes
2
replies
35
views
Avoid creating MongoDB collection automatically when using createIndex
In MongoDB 7.0 when I run db.getCollection("NoSuchCollection").createIndex({ Whatever: 1 }); and the collection "NoSuchCollection" does not exist it is automatically created (and ...
-4
votes
1
answer
126
views
Spring Boot 4.0.0 with a MongoDB database, the properties in application.properties are not working [duplicate]
The properties in the application.properties file are not working. The application connects to the test database instead of the one specified in the application.properties file, and it also connects ...
1
vote
2
answers
88
views
Next.js 15 App Router - Server returns updated data but UI shows cached result
I am getting a caching issue in a Next.js project.The Server updates the database and returns the new value but the UI still shows cached value until I manually refresh the page.
page.tsx
import ...
1
vote
1
answer
58
views
In a MongoDB transaction, are index entries updated immediately when an indexed field is modified?
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 ...
Tooling
0
votes
4
replies
69
views
Docker and MongoDB
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:
...