Questions tagged [mongodb]
All versions of MongoDB - a scalable, high-performance, open source, document-oriented database.
2,318
questions
1
vote
0
answers
6
views
How to implement disjoint (nonoverlapping) subtype with total completeness in MongoDB?
I designed an entity relationship diagram (ERD) with the goal of creating two child entities (INSTITUTION and SPACECRAFT) of a parent entity (LOCATION), which is distinguished depending on the value ...
0
votes
1
answer
9
views
How to update mongodb configure at Docker?
I am unable to enable security parameter at docker of mongodb at mongod.conf file. So how can I configure any parameter at mongod.conf file?
I found a file inside mongodb container named it as mongod....
1
vote
1
answer
19
views
Upgrade a large mongodb database from 3.6 to 6
I have a mongodb 3.6 database with about 7TB of data, and wish to upgrade this to 6.0. It is a very basic db with no replicas, no sharding, etc. Downtime is not an issue - it can be down for days.
I ...
0
votes
1
answer
15
views
MongoDB OplogStart Missing
I understand that some times MongoDB secondary data becomes stale at which point, we need to perform an init sync from the Primary instance.
But sometimes we see error logs that look like this:
2022-...
0
votes
2
answers
16
views
Why MongoDB doesn't allow to connect with the database specified?
I installed MongoDB 4.4 on Ubuntu 20.04. Then, I created a user:
$ mongo
use admin
db.createUser({user:"admin",pwd:"foo",roles:[{role:"userAdminAnyDatabase",db:"...
-1
votes
1
answer
54
views
MS SQL Server Express alternatives, choosing between Relational-DB / NoSQL [closed]
This question relates to choosing the best database storing data on a pc running windows.
The pc is part of a commercial product which generates a big amount of data over time.
Data consists of
Test ...
0
votes
0
answers
14
views
Are there any unintended side effects of limiting a mongodb docker container's CPU or RAM?
It's easy to limit RAM and CPU usage for a docker container with the docker update -m command.
We have limited RAM and CPU using docker update on multiple docker mongodb containers, particularly on an ...
0
votes
0
answers
7
views
What is the meaning of replan:true, truncated:command?
This a command I saw in mongod.log while there are CPU spikes on our VM. What is the meaning of replan:true? And the replanReason: cached plan was less efficient than expected......
As seen from the ...
1
vote
1
answer
17
views
Enable remote access to database via proxy server
What's the most painless way to create something like a proxy server so that my dev team can access a database from anywhere?
The server in question is a managed MongoDB database. Currently, I am just ...
-1
votes
0
answers
13
views
Almost data in MongoDB stored in RAM, If it's has vulnerability such creshed or electucity cut off ss how mongoDB response?
we knew MongoDB mostly stored data in RAM, so if the server crashed or something Vulnerability such electricity cut off so how MOngoDB response ? or how it's processed behind the scene , Thank you.
0
votes
2
answers
21
views
How to recover MongoDB prompt from '>' to secondary node prompt?
I got three test servers using MongoDB 4 with cluster resultset. I stopped the primary node and MongoDB prompt on secondary node changed from 'rsExample:SECONDARY>' to '>'. Then, I started the ...
0
votes
2
answers
24
views
MongoDB - query performance when sharding by _id
When we shard a collection by the MongoDB's _id field, we could achieve the most uniform distribution there is but the docs indicate query performance doesn't scale well due to the scatter gather ...
0
votes
1
answer
35
views
How to replicate between On-Premises and Azure in Mongodb
I have three 3 node cluster on-premises ( 1 Primary and 2 Secondary ). I have same 3 node cluster in AZURE ( 1 Primary and 2 Secondary ) with same version and data but with different FQDN in azure. ...
0
votes
1
answer
73
views
Choosing the right database for stock price history
The model is [(stock_id, period, ts), open, high, low, close, last, volume]
We write new prices for all stocks (120,000) each minute and delete old once when they go out of retention time. It doesn't ...
6
votes
1
answer
1k
views
What kind of database to store Quotes
I'm designing a very simple application to send positive text messages to subscribers at a certain frequency.
These are just famous, motivational, encouraging and positive quotes.
When I first thought ...
0
votes
0
answers
25
views
what causes sudded increase in size of WiredTigerHS.wt in mongodb5.0
I have mongodb 5.0.8 on linux
We run multiple clusters but I see that on one cluster , with 3 shards there is a simultaneous increase on all shard servers in WiredTigerHS.wt file at times in my ...
1
vote
1
answer
80
views
How to delete MongoDB log files
We are using MongoDB 4.0.4 version for our project. The database configuration is done as below:
Created a custom database in MongoDB and the service is running in authentication mode.
Using Windows ...
0
votes
1
answer
307
views
Error upon adding a new node. "NotWritablePrimary: Not-primary error while processing 'find'"
I have 2 node replica-set
Vm1 - Primary
10.1.0.2
Priority = 2
Vm2 - Secondary
10.1.0.3
Priority = 1
Now I am trying to add a new node (Vm3 10.1.0.4 - Secondary Priority = 0) based on Data folder from ...
0
votes
1
answer
28
views
Associating transactions with payouts in marketplace
I'm developing a marketplace-style application that allows users to upload purchasable digital items -> the public purchases these items -> and for my application to pay the users (owners of ...
0
votes
0
answers
15
views
What is the best way to track user ip and id for the page visits
I am 15 pages in my site. I want to track the guest user (through IP) & loggedin user (through userid) for all the pages.
What I have schema is:
Create a table;
create one entry;
and make 15 ...
0
votes
0
answers
10
views
How do you use populate to sort a list of collections in Mongoose?
I thought this was possible, but looking at this:
https://stackoverflow.com/questions/31357745/find-after-populate-mongoose
It seems like it's impossible. What are the alternatives? I tried to think ...
0
votes
0
answers
38
views
Restore Mongo DB backup
I have mongodb backup files as in.wt and.bson and some wieldtrigger files. I have installed mongodb on a new server and copied backed up files to /var/lib/mongo folder and restarted the mongodb ...
0
votes
1
answer
24
views
Can we use a mongodb 4.3.3 and mongodb 2.6.5 in same replica set?
we are running a mongo 2.6.5, 5 member replica set on CentOS and are looking to upgrade to 4.3.3. We do not use sharding. The tricky part for us is that we operate a service and can't have scheduled ...
0
votes
0
answers
21
views
How to increase writes (inserts) without reducing oplog window in MongoDB
I have a MongoDB cluster. The cluster is currently writing (mostly inserts) 4k/sec. When I increase the number of inserts from 4k to 5k, I can see oplog window slowly reducing, possibly to 0 if I do ...
0
votes
0
answers
46
views
how many databases can i make on a single mongodb replicaset cluster
I have a mongodb replicaset with 13000 tiny databases ( < 10 Mb )
This is now running on mongodb5.0
I restarted today to set the replicaset name
This is taking for ever
I get lines like
{"t&...
0
votes
1
answer
41
views
how to convert mongodb db.currentOp() into json
I want to create an interface for all running processes in Mongodb
How can I convert mongodb db.currentOp() output into json so that I can access that
The output currently is a BSON string and I ...
0
votes
1
answer
34
views
Increase security of mongodb-based flask/react applications?
this is the first time I use mongodb seriously, and I have a question about best practices when it comes to access.
Say you have a typical mongodb/flask application. The users use the browser (via ...
0
votes
0
answers
44
views
Which database / search engine for filtering application
I've asked the question on here: https://stackoverflow.com/questions/71819288/mongodb-vs-elasticsearch-indexing-parallel-arrays
But, I didn't get any answer. I believe here it's the right place for ...
0
votes
1
answer
55
views
Better way to store panel data in SQL or NoSQL
I have an Excel of raw panel data (cross sectional + time series) sent to me by customers (I cannot change this). For those not familiar, imagine the gdp time series for each country. I need to ...
-4
votes
1
answer
62
views
MongoDB not logging to log file
mongodb at some point stops logging events in the mongodb.log. the mongod process results up.
version Mongodb 4.4 Replica Set ( PSA )
linux operating system CentOS Linux release 7.9.2009 (Core).
-rw--...
0
votes
2
answers
123
views
how to get mongodb current featureCompatibilityVersion into a variable with only version
how to get mongodb current featureCompatibilityVersion into a variable with only version
instead of printing like this
db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
{ "...
0
votes
0
answers
23
views
Why do queries get stuck on single shard of mongodb cluster and disappear when i stepdown
I have a 15 shard mongodb PSS cluster with huge traffic approx 1TB per shard data
I have seen that the queries get piled up on some shards which I find using db.currentOp on the mongos server.
I do ...
0
votes
0
answers
271
views
Unable to start mongod service in 5.0 and connect to mongoshell
Unable to start mongod service in 5.0 and connect to mongo shell:
systemctl start mongod.service and tail the log, I see that process is getting killed.
Not sure what has changed in 5.0, I tried ...
0
votes
1
answer
149
views
Do I need to split a 1.5 billion document database into several in a standalone MongoDB?
There will be total 1.5 billion documents in nearly 100 collections in one database. Need I to separate this database into several? Is there a performance limitation for a single database when the ...
0
votes
0
answers
77
views
Errors in mongos after changing config server
Replaced config server by https://www.mongodb.com/docs/v4.4/tutorial/replace-config-server/, now we are seeing problems from mongos
server. It can be seen from the log that the mongos server tries to ...
0
votes
0
answers
30
views
Attempting to remove Object from a Array where an attribute matches the value passed through the query
I am attempting to write a query that removes the element from the array based on the messageId associated with said object in the array. This is submitted through curl hence the formatting, I've ...
0
votes
1
answer
44
views
MongoDB: slow removeShard
I have a MongoDB cluster with 9 nodes (3 shards, 3 nodes each). I'm now removing one shard, but the process itself is running extremely slow. Each node of the shard being deleted stores ~400Gb of data,...
0
votes
0
answers
32
views
questions related to mongodb timestamp and mongodump with oplog
mongodb replica set is PSS:
d1node - SECONDARY
d2node - PRIMARY
d3node - RECOVERING
mongo ... --host=d3node --port =1234
mongo1234:RECOVERING> rs.printSlaveReplicationInfo()
source: d1node:...
0
votes
0
answers
59
views
mongod replica set state change on secondary node when resyncing from healthy node in PSS architecture
In a PSS architecture ?
Question1 Are there a possibilities to get estimation of replication state change from ?
<STARTUP> To <RECOVERING>
<STARTUP> or <RECOVERING> To <...
0
votes
1
answer
76
views
mongodb rs.status to list status of the node
the moment I use sed to replace node and port the quotes are removed and hence syntax error.
Is there a different solution to this syntax error.
NODE=abcd
PORT=1234
mongo_cmd="mongo admin -u $...
0
votes
0
answers
79
views
What could cause "spikes" of slow queries in MongoDB?
I operate a fairly busy HTTP backend over a MongoDB cluster consisting of a primary instance and two secondary nodes. Most commands and queries are served by the primary DB node, and on the surface, ...
0
votes
0
answers
64
views
The amount of mongodb log is generated excessively
I’m using mongodb 3.6.8 for log collection.
I want to get only slow query and error level logs.
I set profilinglevel to (1, 5000), loglevel to 1 for queries only and 0 for everything else.
However, ...
0
votes
0
answers
36
views
Older version of Mongo compass gives exact collection while new one does not
On version 1.29.4 of Mongo Compass I am presented with a document count of collections as soon as I click on a DB along with other overall stats. But on version 1.30.1 I only get a figure like 30 M or ...
0
votes
1
answer
75
views
What is this mongo index with field._ref.$id_1
I have a document in a Mongo collection which has an index as follows:
field._ref.$id_1
This is tripping up a new database driver we're planning on using - it doesn't seem to understand this format, ...
1
vote
1
answer
349
views
MongoDB: specify a default sort order?
I'm using MongoDB v5.
Most of my collections have temporal data, so each document has at least one datetime. Naturally I'm generally most interested in the most recent data, but by default mongo ...
0
votes
0
answers
62
views
MongoDB vs PostGIS for geospatial data
My main concern is that I was I/O and bounding circle queries to be lightning fast. Does MongoDB spatial offer any advantages over POSTgis?
0
votes
1
answer
125
views
Transition from MongoDB Time Series Collections to InfluxDB
With version 5.0 MongoDB's specialized Time Series Collections were introduced to deal with such data. As I already stored some sensor meta data (configuration, specification ...) in MongoDB, I ...
1
vote
1
answer
32
views
Storing and Querying User Defined Data
I'm working on a system where each user defines a strongly typed definition of data they can store, consisting of classes with specified fields. Embedded classes are also supported. My first instinct ...
1
vote
0
answers
353
views
Using mongodump to dump all databases but exclude a collection
The mongodump tool seems not to support the option --excludeCollection=someCollection when not specifying the --db someDb option. We would like to dump just all databases without explicitly specifying ...
0
votes
0
answers
46
views
Does time cost of insert depend on the collection's size in MongoDB?
I've noticed that the inserts on my MongoDB are getting slower as the collection grows. The collection doesn't have any indexes.
I wasn't able to find anything about this topic in the official ...