Questions tagged [mongodb]

All versions of MongoDB - a scalable, high-performance, open source, document-oriented database.

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

MongoDump Failed: error writing data for collection `collection` to disk: error reading collection: EOF

[BACKUP COMMAND] mongodump --host 127.0.0.1 -d database --port 27017 --username username --password password --out /output/path/mongodump_DATE_12_00_AM [ISSUE] Failed: error writing data for ...
0
votes
0answers
8 views

Structure to store/analyse Typeform results

I am working at a company which sends surveys to companies using TypeForm, we now want to fetch the data from TypeForm using Webhooks, this is not an issue, here is an example of the payload I get ...
0
votes
0answers
11 views

Adding multiple indexes to avoid skip/limit in MongoDB

Let's say I have a MongoDB's database with millon of records having a City name, a User name and an activity. City | User | Action ------------+--------+------------------- Gotham | ...
0
votes
1answer
13 views

MongoDB - count current read/write operations

is it possible to count the current read or write operations on a mongodb replica set? (including all databases not just a single database) Thank you! Best regards
0
votes
0answers
31 views

how to migrate a mongodb over a couple of versions safely & efficient? [closed]

what is the best method to migrate a database (or at least 1 of 6 collections) from mongodb 2.4 to 4.4 with "reasonable effort"? i know there is mongodump/mongorestore, which is considered ...
0
votes
1answer
22 views

Cannot restart or repair mongodb database after the crash (***aborting after invariant() failure) [closed]

After an unexpected crash, I can't restart or --repair the mongodb database anymore. While restarting the server with systemctl restart mongodb I am getting the following: 2020-09-16T20:25:23.835+...
0
votes
0answers
16 views

Mongodb TTL Index not expiring documents from collection

I have TTL index in collection fct_in_ussd as following db.fct_in_ussd.createIndex( {"xdr_date":1}, { "background": true, "expireAfterSeconds": 259200} ) { &...
0
votes
0answers
8 views

mongo replica is down

I have A mongo replica with 6 nodes, not sure why but 4 of them went down and two entered to recovery state. each time I tried to start the service of one of the down nodes it fails with error there ...
0
votes
0answers
24 views

“any” + comprehension list in pymongo query [migrated]

I would like to write a pymongo snippet to query from a database all documents having a specific field value within a given list (so also a value which is a subset of any element in the given list). ...
0
votes
0answers
4 views

Logical Sessions not closing at MongoDB 4.2 [duplicate]

How do I close my all idle connections in MongoDB as forcefully?
0
votes
0answers
9 views

How to populate array from mongoDb un Dotnet Core? [migrated]

I would like to inquire regarding the query of data from a database in MongoDb. I'm learning about it, and the documentation is still a bit difficult for me to understand. The thing is, I want to ...
0
votes
1answer
13 views

Mongo Database - Dirty Shutdown

We have a major issues on our MongoDB and I've attached the latest logs and files. In previous forumns I've seen this get fixed by your team. Can you please help as soon as possible please, we are a ...
0
votes
0answers
15 views

How to show specific type record first in mongodb?

I want to show result in specific order. I have two categories on request instant and want to show instant record first. Here is my data: { "_id" : ObjectId("...
0
votes
1answer
12 views

Skewed Read Load on Mongo Replica Set

I have set up a mongo replica-set with one primary and two secondaries. The problem that I am facing is that the reads from application servers which are connecting with replica-set connection URL are ...
0
votes
0answers
7 views

Splitting existing MongoDB cluster into two clusters with minimal downtime

We have one MongoDB cluster with 3 shards. Each shard consists of 5 replicas, one of replicas is hidden. Only one very large and active collection is actually sharded, everything else is located in ...
0
votes
1answer
19 views

Is mongoexport more optimized for querying than running the same query with a driver like “mongodb” for nodejs?

I'm in charge of building a nodejs module that dumps varied amount of data from a mongodb into a file and then put it into S3 (sometimes a single document, sometimes thousands, like a whole collection)...
0
votes
1answer
46 views

Why mongod.service is killed by my system?

I am using MongoDB 4.4 version on ubuntu 20.4, using 2 mongo instances on the same server. I encountered this problem: Sep 03 10:45:25 mlnode systemd[1]: Stopping MongoDB Database Server... Sep 03 10:...
0
votes
0answers
25 views

MongoDB rejects multi range value [closed]

my query : db.chat.find({"text": /putin/, "timestamp": {"$gt": 1598572800, "$lt": 1598832000}}).explain() result : > db.chat.find({"text": /putin/,...
0
votes
2answers
23 views

Should I disable MongoDB balancer to prevent moveChunk to block database due to “W” lock

In my team, we have a MongoDB 3.6 with 4 shard cluster. My teammate built up Ops Manager and we found out at some point the queries are slow and they are all waiting for database level lock. "...
0
votes
1answer
15 views

What does it mean that a mongodb query has a waitingForLatch value of ReplicationCoordinatorImpl::_mutex?

Some queries that are normally fast sometimes take ages to complete. I checked currentOp() and the queries that are taking so long are waiting for the ReplicationCoordinatorImpl::_mutex latch. None of ...
0
votes
1answer
19 views

MongoDb: acquireWaitCount and timeAcquiringMicros is missing from system.profile output

I enabled profiling in a mongodb database since sometimes a query is fast while sometimes the exact same query takes a very long time, despite the execution plan being a IXSCAN. I suspect it is due to ...
0
votes
1answer
36 views

Why does MongoDB still support MapReduce, but actively discourage people from using it?

Looking at the MongoDB documentation I see that users are discouraged from using MapReduce in favour of the Aggregation pipeline. For example, on this page in the documentation. But the same notice is ...
1
vote
1answer
658 views

MongoDB start errors

I was following along a course and entered a command that was given "mongod --dbpath=data --bind_ip 127.0.0.1". In the past I had used mongo and it had worked but Im sure I had never entered ...
0
votes
1answer
9 views

Mongo - findAndModify has to be executed twice to take effect

I have a collection campaign like this: { "_id" : ObjectId("5ec12c501bd23866ef315a85"), "schemaVersion" : "1", "internalVersion&...
0
votes
0answers
3 views

Ops Manager Upgrade to 4.2

We have planned to upgrade our Ops Mgr from 3.6 to 4.2 Need to know what are all the configuration parameters and other prerequisite I should be aware of?? Should there be any change on the agents ? ...
0
votes
1answer
32 views

MongoDB not using wildcard nested array index

I have the following collection: { _id: 12345, quizzes: [ { _id: 111111, done: true } ] }, { _id: 78910, quizzes: [ { _id: 22222, done: ...
0
votes
0answers
22 views

request conversion is not supported from SQL Server to MongoDB

I'm using a Linked server from SQL Server 2012 to connect to MongoDB via BI Connector ( MongoDB Atlas ). I can retrieve some info that is int for example, but when running the query below, I receive ...
2
votes
2answers
42 views

Failed to start mongo.service on ubuntu 16.04 after update from 4.0 to 4.2

I'm trying to update my MongoDB installation from 3.6 to the latest version [4.4] on Ubuntu16.04 using apt-get. Going from 4.0 to 4.2 I faced a problem during the startup process after updating the ...
0
votes
1answer
26 views

How to create a MongoDB index with isodate?

I've create and index for a query and its running is less then 1 second to retrieve millions of rows, but as soon as I add greater than ISODATE, it doesnt use indexes anymore. the query is this one: ...
0
votes
0answers
41 views

modelling bill split app schema

I've been trying to model an efficient schema for a bill split app, the requirements are as follows: There can be groups in which there can be multiple participants, and conversations consisting of ...
0
votes
0answers
27 views

MongoDB replica after restore

I've got a PSA mongodb which I'm restoring starting from a backup made on a standalone installation. I set the PRIMARY machine in the --host parameter but the replication does not start on the ...
0
votes
2answers
43 views

Oplog incremental backup failure

I have scheduled oplog incremental dump using mongodump but it fails very often on majority of the servers. I have a shard cluster with around 200GB of oplog size defined and around 30-40 hours of ...
1
vote
1answer
33 views

mongodb removeShard issue with config.system.session

I have a staging mongodb 4.0.19 sharded cluster with 2 replica set shards . I want to remove one shard. I followed the documentation: https://docs.mongodb.com/v4.0/tutorial/remove-shards-from-cluster/...
0
votes
0answers
10 views

How do I generate the default collections from a fresh Django installation inside a Mlab database?

When I use Djongo to install the default Django installation migrations onto my local computer server's MongoDB Compass sever, the collections such as 'auth_group', 'auth_group_permissions', '...
1
vote
0answers
23 views

How to check progress with mongorestore

I'm using mongorestore to move a dump from a location to another. I've to use the quiet flag and I'm on Windows. How can I check for restore progress? Actually I can only check the size of the db on ...
2
votes
1answer
24 views

Is it safe to have Mongo replicas on single server? [closed]

I am planning a minimum setup for a low traffic discussion forum. Everybody says to use replicas because otherwise I am in a risk of data loss. I see an advantage that I can add new more powerful node ...
0
votes
0answers
14 views

Concurrent connections calculated in Mongodb Atlas

I'm considering using mongodb for a mobile backend database, and I'm slightly confused at something I haven't found an answer to in the documentation. Are the concurrent connections for each tier in ...
0
votes
0answers
50 views

Database design and relationships between users and tables

I am trying to design a database and i am having some questions, hopefully you can guide me for the next steps. Setup My stack consists of Node.js in the backend and my test DB is in Postgresql but i ...
0
votes
1answer
66 views

Mongodb index keeps growing in size eventhough the collection has a TTL index

I work on a mongodb sharded cluster (3.0.2 i know it's very outdated, not my call), on which i have a sharded db and a sharded collection on which i have multiple indexes. One of the indexes is a TTL ...
2
votes
1answer
116 views

MongoDB: Mongoimport server selection error , connection refused, too many files open

Trying to insert several JSON files to MongoDB collections using shell script as following, #!/bin/bash NUM=50000 for ((i=o;i<NUM;i++)) do mongoimport --host localhost --port 27018 -u 'admin' -...
0
votes
0answers
13 views

Will the arrayFilter use an index if I created one matching the filter?

I am using updateOne to update some of the fields of an object embedded in an array property of a document. The document itself has a valid _id, which is being used in the query of the updateOne call. ...
3
votes
0answers
43 views

Mongodb 4.2 Brute Force Defense

Is there any tool or configurations for mongodb server to protect against brute force attacks on the user credentials? I found only authFailedDelayMs param witch Available in MongoDB Enterprise only (...
0
votes
0answers
10 views

Mongodb Reads & Writes for a specific time period

Need to know if there is any possible way to find the total no. of reads and writes happening to my mongodb environment. We are using Mongodb 3.4 version in a sharded environment and need to find the ...
1
vote
2answers
45 views

Mongoose is not showing the ISODate in the result

I am using mongodb version 4.2.2. I have following data: { "_id" : ObjectId("5f0c58089c058304f7a64fa9"), "date" : ISODate("2021-07-11T00:00:00.000Z"), ...
0
votes
0answers
8 views

MongoDB : Log failing DB backups

is it possible with Java Script to capture the errors of MongoDB backup failer and send this message to Windows event logs Best regards
0
votes
0answers
10 views

Run MongoDB under a Windows Managed Service Account

In Windows environment can I run MongoDB under a Windows Managed Service Account? the main reason is there is a company policy about PWD expiration each 60 days, and we want to use Managed Service ...
0
votes
1answer
29 views

Is “many database writes” an anti-pattern?

I am designing a database api. I have two options: Have a complex aggregation that queries the data as desired or, Create a materialized view that logs all data changes in an easy to query manner and ...
0
votes
1answer
31 views

MongoDB multi-datacenter deployment and shard keys

I am trying to check my understanding after reading docs and some older questions, so my question is quite loaded: In a sharded cluster, each shard should (and as of 3.6 must?) reside on its own ...
-1
votes
1answer
21 views

Migrate data from an older version of mongodb

How can I backup and restore a large mongodb database (500GB) from a server running an older version (v2.6) than the target one (v3.6)?. The downtime is critical. We've tried by making a straight copy ...
0
votes
1answer
13 views

How to parse MongoDB int32 in node.js

I am using MongoDB for a discord bot I am working on, and I want to retrieve a user's balance. My current code is function findBalance(id){ MongoClient.connect(url, function(err, db) { if (err) throw ...

1
2 3 4 5
43