175,968 questions
-2
votes
0
answers
16
views
How to Generate Reports from MongoDB Community Edition and Integrate Them into a React UI?
I am using MongoDB Community Edition as my database and need to generate reports based on the data stored in my collections. The reports should be query-driven and provide insights such as aggregated ...
0
votes
1
answer
32
views
Error handling in NodeJS service classes and controllers
I am very new to both JavaScript and NodeJS and am struggling to grapple some of the concepts surrounding async, promises, and others, and especially how to structure the code properly. I am trying to ...
0
votes
0
answers
20
views
Create a compound Index on a huge collection
I have a 3-node replica set of MongoDB 7.0.17 with 8 vCPU and 32GB RAM. There's a huge collection (with ~20M documents) on which there's a requirement to create two compound indexes.
Every time the ...
0
votes
1
answer
34
views
Issue Restoring Data After Upgrading MongoDB from 4.4.29 to 8.0.3 [closed]
I’m facing an issue while trying to restore data from data directory into mongodb 4.4.29 . Here's a brief overview of what happened:
Steps Taken:
I had MongoDB 4.4.29 installed on my centos 8 server.
...
-1
votes
1
answer
23
views
Access Docker container database with MongoDB Compass
I have a MongoDB running in Docker, but I can't connect to it from MongoDB Compass.
My docker-compose.yml exposes port correctly :
ports:
- "27017:27017"
When I connect inside my container I ...
0
votes
1
answer
12
views
mongodb_mongod_metrics_ttl_deleted_documents_total seeing this metric in graph
Hi so we have a few collections in my mongo db. for which we have normal indexes created other than primary key. none of those index are ttl indexes. but in mongo db graph we keen seeing ttl delete ...
-1
votes
0
answers
22
views
MongoDb- Node.js server mistakes [duplicate]
DB Error: MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted....
1
vote
1
answer
35
views
Error NU1202 MongoDB.Driver update issues
Have a ProjectA created for .NET Standard 2.1 with nuget packages MongoDB.Driver v2.12.0 and AspNetCore.HealthChecks.MongoDb v3.1.3.
As part of MongoDB.Driver package upgrade, it updated the MongoDB....
0
votes
1
answer
43
views
Create a field and assign objectId value for it in aggregation pipeline
This is an example of record stored in my mongo collection
{
"_id": "{\"_id\": {\"$oid\": \"67a20f0adee77ef71adfe8bc\"}, \"copyingData\": true}&...
1
vote
1
answer
38
views
is it possible to check whether the user-given foreignFieldId (req.body.foreignFieldId ) exists or not before calling db.create(req.body) in MongoDB
Product Schema:
const productSchema = new mongoose.Schema({
name: { type: String, required: true },
price: { type: Number, required: true },
addedBy: { type: mongoose.Types.ObjectId, ref: '...
0
votes
0
answers
21
views
Frequently updated data in MongoDB is not visible in Open Search via Monstache syncing
I have mongodb database for storing all the data, from few collections I'm syncing MongoDB database data to AWS Open Search via Monstache Plugin. For normal case working fine but when some of my ...
-1
votes
0
answers
24
views
connect with mongodb atlas and choode render for hosting i got below error when url change to atlas,when url is localhost 27017 there is no error
const timeoutError = new error_1.MongoServerSelectionError(`Server selection timed out after ${timeout?.duration} ms`, this.description);
^
MongoServerSelectionError: 38A70000:...
-2
votes
0
answers
32
views
Automatic response header writing in nodeJS [closed]
I'm having a problem with a controller (create), each db call made using mongoose (look at the service) will automatically write to response headers with no manual control over it, that's leading to ...
0
votes
0
answers
68
views
Why am I getting this OAuthCallback error
I am trying to build a linked clone with next.js and despite everything being correct I am getting this OAuthCallback error after signing in with my credentials and I am getting redirected to home ...
0
votes
1
answer
44
views
Update an array value in document with Pymongo
I am creating a tracker that tracks the usage of invites on discord and who used which invite when a member joins. I am storing the data in mongodb. I am having trouble update the uses value which I ...
0
votes
0
answers
28
views
The edge runtime does not support Node.js 'crypto' module error while adding mongoClient and trying to fetch the sesssion in Auth Js v5
My project uses Authjs for authentication, Ive followed the documentation in splitting the auth file into auth.config and pasted their middleware: https://authjs.dev/guides/edge-compatibility .
import ...
0
votes
0
answers
38
views
Mongosh shell not running [closed]
I downloaded the mongodb shell file, copied the location of the mongosh.exe file and pasted in the system variables (created a new variable name for that). Followed all the steps. But running the .exe ...
0
votes
0
answers
15
views
Invalid `})=>p.user.update()` invocation in PrismaAdapter (AuthJs)
I've setup an app with NextAuth. You can only signing in by magic link with Resend. The email is sent but when I open the link in this email, an error is thrown. I've been looking for a solution for ...
0
votes
0
answers
30
views
Exception authenticating MongoCredential{mechanism=MONGODB-AWS,
I am using AWS IAM for connecting with Mongodb in Java Springboot. I have added aws v2 auth SDK, but I'm getting auth failure error. In logs I can see it's trying to use IAM but not working.
...
0
votes
0
answers
39
views
Mongorestore not restoring all documents
I have two databases that I want to merge into one. I ran mongodump on the first one, then ran mongorestore on the other. When I run mongorestore, there are a lot of continuing through error: E1000 ...
0
votes
0
answers
23
views
Pymongo mongdb delete one querying issue [closed]
I am new to mongodb and I am attempting to have a query that will delete a timestamp in voice_activity when provided the id to the left of it. The date is unknown to me at the time of the query. I am ...
0
votes
0
answers
24
views
MongoDB adapter in PayloadCMS not working
When I use
db: mongooseAdapter({
url:
'mongodb+srv://<user>:<password>@<collection>.eyqv8.mongodb.net/'
}),
in payload.config.ts
that result in error:
./node_modules/@...
-1
votes
0
answers
67
views
Do I need to encrypt my payloads if I am forcing https? [closed]
Building an API that needs to be HIPPA compliant.
So far the stack is
FastApi -> Docker Image -> AWS Lambda with Env Variables -> AWS API Gateway secured endpoints with API Keys.
While ...
0
votes
1
answer
34
views
MongoDB bindIP Configuration Issue: Cannot Connect to Replica Set Members when using Hostnames or IPs
I'm an IT student and currently working on a MongoDB Replica-Set. I'm configuring the configuration file for my MongoDB replica set, which consists of three members. All members are registered in my ...
0
votes
0
answers
25
views
MongoDB Atlas Connection Issue: Error: queryTxt ETIMEOUT cluster0.nqjp7.mongodb.net
MongoDB Atlas Connection Issue: queryTxt ETIMEOUT & ServerSelectionError
I'm trying to connect my Node.js backend to MongoDB Atlas, but I'm getting connection errors.
Error: queryTxt ETIMEOUT ...
-2
votes
0
answers
15
views
"message": "E11000 duplicate key error collection: BusBooking.bookings index: adminId_1 dup key: { adminId: null }", [closed]
first created a booking collection using adminId and busId
then one document added to collection
now I change the model to userID and busId
it show this error
I try to delete the collection and ...
0
votes
1
answer
41
views
.NET 8 docker container doesn't access Mongodb container [closed]
I have implemented and tested correctly locally in my pc a simple ASP.NET Core 8 Web API which access a local mongodb running in a docker container (localhost:27017). The app I implemented is this ...
0
votes
0
answers
21
views
metrics name change in mongodb exporter needed some clarification
We recently noticed that the metric mongodb_mongod_replset_member_optime_date is no longer available in the latest MongoDB Exporter versions and seems to have been replaced with ...
1
vote
0
answers
34
views
Read mongodb document as a string/text using databricks readstream/writestream
I'm trying to read documents from mongodb Into databricks using spark structured streaming.
I'm using to_json() to convert whole document to string. When using this, the schema evolution is working ...
0
votes
1
answer
35
views
Filtering in Atlas Vector Search
I'm following this tutorial on Spring Boot AI with MongoDB
The only difference is that I'm using the very latest version of Spring AI, which is 1.0.0-M6 which has some slight syntax differences to the ...
0
votes
1
answer
79
views
a confusion about schema design for storing store's profits and how to retrieve them in mongoose [closed]
For displaying the (daily-weekly-monthly-annual) total profits for the store's dashboard.
I want to store the data in an array for each store to not have multiple docs for the same store but different ...
0
votes
0
answers
29
views
Clerk Webhook not getting trigger and mongodb not updating
Im making my project and using clerk for authenication and i want clerk data to be pushed on my mongodb but its not getting update and there no way to see any error logs as nothing displays on ...
-2
votes
0
answers
61
views
MongoDB refused to connect to ubuntu server [closed]
The error is suggesting no connection and that my ip not being whitelisted despite I have whitelisted it.
0
votes
1
answer
49
views
How can I properly handle database connections in a Node.js application?
I'm building a Node.js application using Express.js and MongoDB (Mongoose). I want to ensure that my database connections are handled efficiently to avoid memory leaks and connection issues.
Currently,...
-2
votes
1
answer
49
views
Is Mongoose really an ORM, or is it something else? [duplicate]
I keep hearing people say that Mongoose is an ORM for MongoDB, but I thought ORMs are for relational databases like MySQL or PostgreSQL. Since MongoDB doesn’t use tables and rows but instead works ...
0
votes
1
answer
52
views
How to effectively handle multiple message in Kafka?
I've test performance of my consumer and the result is not good.
The consumer job is mapping incoming message from Kafka and storing it into DB (MongoDB).
I use NodeJS and ExpressJS for the server.
...
-1
votes
0
answers
24
views
Error when deploying full stack app on render
I'm attempting to deploy my full stack chat app thru render but I keep getting a build error of: frontend/node_modules/rollup/dist/es/shared/parseAst.js. My build settings are npm run build and for ...
0
votes
0
answers
47
views
Next.js Prisma Base Service: UserDelegate Error with Related Schemas
In my Next.js project, I created a BaseService using Prisma and extended it for sub-services. Everything works fine for normal usage, but when I try to use this approach with schemas that have ...
0
votes
1
answer
81
views
Pydantic "Input should be a valid string" when constructing with dictionary
This is the beginning of the class code, the dictionary I am using to construct the class, and the lines where the code fails.
from beanie import Document
from pydantic import Field, ConfigDict, ...
0
votes
2
answers
67
views
POST document hook or middleware in mongoose isn't working
I'm using mongoose v8.7.3, here is part of my code which is not working as expected.
const updateOne = (Model) => catchAsync(async (req, res, next) => {
const doc = await Model....
1
vote
0
answers
81
views
Setting cookie's domain causes TypeError: option domain is invalid
Follow-up from Express session loses passport user ID on a Safari cookie every week . In Express and NodeJS, I want to set a cookie's domain so user agents see it as a first-party cookie. If I set it ...
3
votes
0
answers
36
views
Building MongoDB C++ Driver from VCPKG with C++17 or later and no polyfills
It seems that the mongo-cxx-driver VCPKG package cannot be built without the C++17 polyfills, so when you install the MongoDB C++ driver from VCPKG, you are forced to use non-standard implementations ...
0
votes
0
answers
36
views
running MongoDB with rootless podman
I have the following system:
Fedora 41
podman-compose version 1.3.0
podman version 5.3.2
and I followed this tutorial for rootless podman. basically pasta for rootless networking, and the /etc/subuid ...
0
votes
0
answers
27
views
Mongoexport with Project variable [closed]
When I tried to connect to mongodb with using ODI 12c procedure as it bellow, it is okay. I can connect and get export.
mongoexport --uri "mongodb://username:password@test-shard-00-00-1qpma....
-1
votes
0
answers
26
views
Local writing to MongoDB but not deployment
How are you?
Creating a basic app with Nextjs and MongoDB.
Rn just the home page that runs a function that writes to MongoDB
( using mongoose )
repo - https://github.com/MooDevArts/to-do-v4/
I ...
-2
votes
1
answer
27
views
How to import a jpeg or png into MongoDB using BSON? [closed]
I am somewhat new to MongoDB.
Does anyone know how to import a jpeg or png into MongoDB? Ideally, from a Cell Phone App using the MongoDB Driver. From what I am reading, there is a 16MB limit on files ...
-1
votes
0
answers
38
views
mongoDb cant find user in adminDB
I am just starting to learn Nodejs and MongoDB, unfortunately I have a problem right at the beginning.
after I have created a MongoDB with user and password via Docker (a Docker desktop is running in ...
1
vote
0
answers
47
views
Unable to connect AWS lambda to Mongodb through VPC [closed]
AWS Lambda MongoDB Atlas Connection Timeout Issue (VPC Peering)
I have an AWS Lambda function that connects to a MongoDB Atlas cluster. To enable this connection, I have:
Configured a VPC and peered ...
0
votes
0
answers
28
views
How to solve getServletContext() returning null? [duplicate]
I am working on a small jakarta ee project for a software engineering course I am taking. I am to connect a database to store user input from a form into the database using a servlet. I removed the ...
1
vote
1
answer
40
views
Next.js + Mongo/Mongoose query taking 3+ minutes in local dev: “DB Query time: 168,000 ms”
When a user logs in on src/app/page.tsx, I redirect them to /student/dashboard, which calls my /api/tasks endpoint (passing ?userId=...&page=1&limit=20) to load the user’s tasks. However, my ...