Unable to check featureCompatibilityVersion of standalone 3.4.24 database
Reddit » MongoDB
by /u/JGink
15h ago
Planning to upgrade an old 3.4.24 standalone database, one step at a time. One of the requirements listed for upgrading to 3.6 is that the featureCompatibilityVersion is set to 3.4 Runningdb.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } ) with my admin user returns "errmsg" : "not authorized on admin to execute command { getParameter: 1.0, featureCompatibilityVersion: 1.0 }" Googling this issue returns pretty much nothing, I guess this isn't supposed to happen. I haven't been able to find specifically what role a user needs to have to check the featureCompatibilityVersion ..read more
Visit website
Can't connect to MongoDB using Mongoose and Nodemon
Reddit » MongoDB
by /u/techsavvynerd91
15h ago
I'm trying to connect to my cluster in MongoDB using Mongoose by running nodemon server and I keep getting the following 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. Make sure your current IP address is on your Atlas cluster's IP whitelist: https://www.mongodb.com/docs/atlas/security-whitelist/ I have a database user with atlasAdmin@admin in MongoDB and the IP address in the network access tab is set to 0.0.0.0/0, yet I'm still unable to ..read more
Visit website
Good practice for "post" document?
Reddit » MongoDB
by /u/VehicleAppropriate75
1d ago
Hey guys, I'm not sure whether this is the correct sub to ask this on (please let me know if it's not). I'm assuming this is a basic dilemma for developers, I want to create a collection of posts, for example on social network, then each post should include the details of the user, such as name and avatar as part of the post. If in each document I just insert the userId for this additional data (name and avatar), I should perform an additional lookup for each document. Alternatively, I could insert this data directly in the post document, and then if the user changes their data later, I shoul ..read more
Visit website
How to query for a nested field that is in a relation
Reddit » MongoDB
by /u/heretolearn9721
1d ago
Lets say i have this Receipt { billValue: 120 CustomerId: 12345 } Customer { Id: 12345 State: “active” } I want to get all receipt with active customers submitted by /u/heretolearn9721 [visit reddit] [comments ..read more
Visit website
Tinder like match system
Reddit » MongoDB
by /u/Beagles_Are_God
2d ago
Hi, i'm implementing a tinder like match system for a school project using Express and Mongo. Currently these are the relevant entities, i must say i come from a very relational dbs background. User Like Match So, basically, when a user A gives another user B a like, it creates a new like document, then will look if another like document exists where the user A is the reciever of the like, if that document exists, it creates a new Match. Is this approach correct? I'm using PrismaDB as the ORM and the Match model looks like this https://preview.redd.it/p0oh7m1k9gwc1.png?width=1258&format=p ..read more
Visit website
Need help setting up a database connection
Reddit » MongoDB
by /u/MangosRsorry
2d ago
I am currently using mongodb (atlas if its important) to set up a database. Unfortunately, I keep running into the problem of my connection. However, I have successfully made a connection before on the same network so I am confused. There is a message that keeps coming up saying current IP address not added (It is) and to add it. When I click add IP it turns blue and says connection works, although the current IP address it says is mine is not correct. Anyway in about it minute it always just reverts to saying IP not added. Does anyone have any suggestions? Im not using a vpn or anything eith ..read more
Visit website
What sort of transfer speeds between nodes can be expected in an ideal replica set environment?
Reddit » MongoDB
by /u/Old-Air-9130
3d ago
I am only seeing 50mbit/s speeds over a 2Gb/s connection when replicating between two nodes at different physical locations. This is during an initial sync which should be the "quickest" time because it has so much data to move (around 2TB). It is my understanding that replication transfers over a single TCP connection per node. Default settings are what we currently are testing with, so default write concern is "majority". I have even tried turning off flow control to see if that was the issue, but it is not. What speeds are you seeing in your setup? Thanks! submitted by /u/Old-Air-9130 [vi ..read more
Visit website
MongoDB Live: Revolutionizing Legal Work: How Genie AI and MongoDB Enhance In-House Legal Teams
Reddit » MongoDB
by /u/alexdenne
3d ago
Learn more about the MongoDB Advocacy Program → https://mdb.link/genie-community See how Genie is using MongoDB Atlas → https://www.genieai.co Try Atlas for Free → https://mdb.link/genie-free Join us on the MongoDB Podcast as we explore the transformative impact of Genie AI in the legal sector, with our special guests Dan and Ana from GenieAI. Dan, a software engineer with two decades of experience, brings a wealth of knowledge from backend to frontend development and currently serves as a backend engineer and tech lead at GenieAI. Having started his journey with MongoDB in 2010 and with a di ..read more
Visit website
Query Timing Out with Nextjs, 504 Error
Reddit » MongoDB
by /u/LowkeyWeirdBro
3d ago
Hello! I'm currently dealing with an issue with my app in which I am attempting to query for about 10,000 documents, and the query is taking about 17s. When I go into compass and explain the aggregation, it's saying the time to execute is 58ms. Compass Explain Page The structure of the query is as follows: const user = await Personal.aggregate([ { $match: { userid: id } }, { $unwind: { path: "$activity" } }, { $match: { "activity.time": { $gte: startOfDay, $lt: endOfDay, }, }, }, { $project: { _id: 0, activity: 1 } }, ]); For this schema: import mongoose, { Schema } from "mongoose"; var perso ..read more
Visit website
Getting a strange error with my query
Reddit » MongoDB
by /u/Rebmaladnah
3d ago
I'm just making a project to get a better grasp of database concepts and I'm struggling a bit. Here is the function in question: exports.updateWatchCount = async (database, username, film) => { try { const collection = database.collection('User-Accounts'); const query = { "user_name": username, "collection": { $elemMatch: { "film_name": film.film_name, "director_name": film.director_name }}}; const update = { $inc: { "collection.$.count": 1 } }; const response = await collection.updateOne(query, update); if (response.matchedCount === 0) { console.log("No matching film found to update ..read more
Visit website

Follow Reddit » MongoDB on FeedSpot

Continue with Google
Continue with Apple
OR