Questions tagged [mongodb]

MongoDB is a document oriented database (also known as NoSQL database).

264 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
0 answers
687 views

Moving Rocket.Chat data to different hard drive

I have Rocket.Chat running on Ubuntu 18.04.4 LTS through Snap. I would like to move the data (but not the entire snap) to another hard drive. So far this is what I have tried: Backup Rocket.Chat ...
user avatar
4 votes
0 answers
5k views

Restore mongoDB by --repair and WiredTiger

We accidentally deleted the directory rm -rf /data/db which was our MongoDB path, and thanks to extundelete, we recovered it and got the directory /data/db. Here are our files in the directory, and ...
user avatar
  • 307
4 votes
1 answer
535 views

Debugging Node.js disk I/O and CPU spikes

I'm running a Node/Meteor/Mongo app on Ubuntu (on a Digital Ocean 1GB droplet), and I've been seeing some weird disk I/O spikes, which are then followed by CPU spikes: I was wondering: If that ...
user avatar
  • 141
4 votes
0 answers
5k views

Corrupt WiredTiger MongoDB files

I'm running MongoDB with the WiredTiger engine on an ext4 file system. The last thing that I did was start building an index, but then something came up and I needed to cancel the index build and ...
user avatar
  • 163
4 votes
1 answer
576 views

mongo and app server cpu

The beginning: We are using uwsgi and I decided to switch our configuration to use more workers/processes. Why: We have been seeing a traffic increase lately and in my tests with apache benchmark, ...
user avatar
  • 213
4 votes
1 answer
141 views

Single SSD on a mongodb node

we are getting started with a mongo cluster. The best practices docs mention that the ideal storage capacity per node is ~5TB. Given we can get ~4TB from a single SSD, we are planning to go with it ...
user avatar
  • 51
3 votes
1 answer
1k views

How do I resolve a private DNS address from within an AWS Fargate task

I'm trying to setup a connection to a MongoDB Atlas database from an AWS Fargate container. The VPC peering is setup and works and I can successfully connect to the MongoDB Atlas cluster from a ...
user avatar
3 votes
0 answers
3k views

mongo clients fail about 25% of the time with "message ... is too large"

I am trying to use haproxy in tcp mode in front of a mongo server. On the haproxy machine I have a mongo client to test with. When connecting from the haproxy machine directly to the mongo server ...
user avatar
3 votes
1 answer
2k views

mongodb keep looping while trying to sync data

I'm converting my my standalone mongodb into a replica set. I've added one more member (and I want to add two more members later, and to shutdown the primary server). My primary mongodb is running 2....
user avatar
  • 43
2 votes
0 answers
26 views

Debugging Active Directory Login with MongoDB

I am trying to log into MongoDB using an active directory username. We're using Percona for MongoDB but I believe this really should be pretty similar to regular MongoDB 5.x authentication. We've ...
user avatar
  • 559
2 votes
0 answers
79 views

Why is my mongodb setup not reaching EBS IOPS limit?

I have an application that is constantly pumping data to MongoDB. MongoDB instance is running with 2-replicas, each with 3TB gp2 EBS volume. As you can see on the following graph of irate(...
user avatar
  • 173
2 votes
0 answers
100 views

Not able to connect to Mongodb vie mongo shell

I am no able to connect to mongodb via mongo shell. command: sudo mongo --tls --tlsCertificateKeyFile server.pem --tlsCAFile CA_INTERMEDIATE --host "mongodb://xxx:xxx@some-url:27020/data_base?ssl=...
user avatar
  • 21
2 votes
0 answers
48 views

Differing "free memory" interpretation on virtualized vs. bare-metal Debian 9

I have the same software suite with roughly similarly sized datasets on two Debian 9 systems, with one big difference: os-1 runs on bare-metal and has better hardware, while os-2 is virtualized ...
user avatar
2 votes
0 answers
58 views

Mongodb use native openssl in centos

I'm new to MongoDB and I'm not sure what I am missing in this. MongoDB advises that as of v4.0, it uses the native OpenSSL libraries; but no matter what, my build or install from the repository, the ...
user avatar
2 votes
0 answers
694 views

MongoDB Very slow queries since yesterday

Since yesterday I am having huge trouble with my MongoDB. I have a 100GB collection with over 50M documents. Making a find on them and a .count() was never an issue until yesterday. Somehow, since ...
user avatar
2 votes
0 answers
2k views

running mongodb with ssl and docker secrets docker-compose sample

I'm new to docker. The developers on my work create a docker-compose with mongodb and asp.net core application setup, although its funcional, they didin't setup SSL for the application, mongodb isn't ...
user avatar
  • 23
2 votes
0 answers
5k views

MongoDB: Can I Manually Delete The Collections Inside /var/lib/mongodb Without Breaking Anything?

Due to stupid negligence on my part I forgot to change the MongoDB path. As a result, my collections were stored in /var/lib/mongodb. As I was filling my collections MongoDB hang. Then I realized ...
user avatar
  • 121
2 votes
0 answers
476 views

PM2 running but socket.io stops responding at times

I am using a hostgator vps with apache, for backend, I am using node.js and socket.io, it works fine but at times it just stops working. Pm2 is showing it online but it just stops responding. Can ...
user avatar
2 votes
1 answer
435 views

MongoDB background indexing very slow

I am running MongoDB on an Ubuntu on a single AWS EC2 as m4.2xlarge. The disk is 1280GB io1 22000 IOPS on XFS file system, 73% full (it is only used for MongoDB). The MongoDB server version is 3.4.10. ...
user avatar
2 votes
1 answer
3k views

can't upgrade from mongo 3.4 to 3.6 - Server min and max wire version are incompatible

I have a mongodb 3.4 cluster that I want to upgrade to 3.6. on a test run (virtualbox), I was able to do so, but with the real cluster I'm getting this rs.status() after calling add: ...
user avatar
  • 233
2 votes
0 answers
134 views

How to use extundelete on AZURE VM?

I have an instance of MongoDB running on an AZURE VM, which gets all data dropped. I was trying to find if some file is still there, by using the below command: $ sudo extundelete --restore-all /dev/...
user avatar
2 votes
0 answers
590 views

Use Kubernetes and MongoDB Cluster (sharded) on premises

Currently I am investigating the use of Kubernetes together with a MongoDB cluster. Scenario: We are planning on creating a sharded Mongo Cluster. We intend to use MongoDB's Ops Manager for the ...
user avatar
  • 121
2 votes
0 answers
173 views

Mongos with --upgrade: I have stopped the balancer but

I have a trouble after switching from Ubuntu 14.x to 16.x. MongoDB processes like configuration servers, arbiter and the main MongoDB server are running well. I can access to my databases with the ...
user avatar
  • 21
2 votes
0 answers
149 views

Why is MongoDB replicaset not syncing RBAC $external data in 3.0 to 3.2 upgrade?

I am wondering if anyone has seen an issue upgrading from 3.0.9 to 3.2.8 with the $external user database not getting replicated? I have an existing 3.0.9 replica set environment running with no ...
user avatar
2 votes
0 answers
253 views

MongoDB replication failure

I am trying to debug an odd issue that results in the failure or a replica set secondary becoming out of date and unable to catchup with the primary (running on AWS, AWS linux). The typical ...
user avatar
  • 203
2 votes
1 answer
139 views

EC2 retirement - Meteor / MongoDB

I am hosting my Meteor Application on an Amazon EC2 instance. Today I got a mail that my instance is scheduled for retirement until the end of month. I don't have any experience with that and what are ...
user avatar
  • 121
2 votes
0 answers
1k views

Huge oplog size after full sync on one secondary causing performance issues - MongoDB

I'm a MongoDB newbie. I have a replica set with 3 members (1 primary and 2 secondaries) on CentOS 6 and Mongo 2.6.8. One of the secondaries crashed because of high consumption of memory and I couldn'...
user avatar
2 votes
0 answers
748 views

adding mongodb authentication breaks connecting via nodejs

I needed to have external access to my mongodb database, so I have removed the bind_ip from the mongod.conf file, and turned on auth. I then added a root user that can access everything, and tried to ...
user avatar
2 votes
1 answer
672 views

MongoDB 100% locked periodically. MMS charts attached

Trying to diagnose what could be causing intermittent lock-up on MongoDB server running behind a Rails application. Hoping that someone might recognise the pattern of peaks and troughs in the charts ...
user avatar
2 votes
1 answer
380 views

mongodb 2.4.9 is crashing on wheezy when running as root

I installed mongodb-10gen v2.4.9 on a debian Wheezy, and I'm having this really weird behavior: if I run it as root I can't get it starts: root@xx:~# /etc/init.d/mongodb stop [ ok ] Stopping database:...
user avatar
  • 123
2 votes
1 answer
717 views

LVM+MongoDB. Dropping in speed of backup creation

Till recent time we have been making mongo backups archiving LVM snapshot on hidden SECONDARY server with RAID10 on SAS disks. Currently operation on making snapshot from volume with 500 Gb of data ...
user avatar
2 votes
1 answer
2k views

How to find/kill long running mongo scripts

I think I have a long running mongo script tanking my database, but I'm not sure. I was connected to the linux server via SSH and I ran the script like so: mongo my_database my_script.js It started ...
user avatar
2 votes
1 answer
281 views

Run rc.local only once Mongodb is running in CentOs 7

I have the following script in my rc.local: This runs the services on ports 8080, 8081, 8082, 8083. They are actually node servers that NEED mongod to startup. So, I edited /lib/systemd/system/rc-...
user avatar
  • 719
2 votes
2 answers
2k views

Why is my mongo backup thrice my database size?

I have a mongodb, and there is some data inside. Now much, a bit more then 5GB. > show dbs; local 0.000GB aaaa 0.034GB bbbbb 5.327GB > So I made a backup, using mongodump -h mongo --...
user avatar
  • 133
1 vote
0 answers
18 views

oom_reaper: MongoDb out of memory

We run a small mongodb replica set on three bare metal servers (no virtualization, no docker/kubernetes) with Debian 11 and mongodb 5.0.6: machineA: 128GB RAM, 1TB disk, PRIMARY machineB: 128GB RAM, ...
user avatar
1 vote
0 answers
19 views

Logrotate Create Mode Issue

I have a trouble with logrotate service in linux. I have a logrotate config for mongodb log as below: /var/log/mongodb/mongod.log { rotate 10 daily dateext dateformat %Y-%m-%d-%s ...
user avatar
1 vote
1 answer
608 views

MongoDB Compass GUI: Error importing: Callback called multiple times

I am completely new to MongoDB. Just downloaded and installed MongoDB Community Edition on my local Windows pc. The MongoDB Service is running, and I was able to connect to this local cluster. I have ...
user avatar
  • 111
1 vote
0 answers
273 views

Mongo Authentication when mongod started as a service

System specs: OS: Debian 10 Mongo Shell: v4.4.4 Mongod: v4.4.4 I successfully created a user administrator for MongoDB with the privileges below (output from show users in Mongo Shell). { "...
user avatar
1 vote
0 answers
14 views

mongodb, remove one of the replica set's from a sharded cluster

I need to remove filed server01 (currently offline for a long time). The configuration looks like this: shards: { "_id" : "mongo1", "host" : "mongo1/server01:27017,...
user avatar
  • 45
1 vote
0 answers
846 views

Connect to mongodb replicaset running on docker behing nginx proxy

I'm using docker-compose for mongodb replica set. Everything work fine on my host where docker is running. I had problems when I tried to connect from another client which is in the same network.I ...
user avatar
1 vote
1 answer
873 views

How secure is setting mongodb to 0.0.0.0 but blocking all incoming requests to 27017 on ec2?

As the title suggests. If I set the net.bindIp setting in mongod.conf to 0.0.0.0 on port 27017 this should open it up to all incoming connections. However, if in my ec2 instance I whitelist only my ...
user avatar
1 vote
0 answers
88 views

How do I upgrade a Mongodb replica set running in a Docker swarm?

I'm running a Mongodb cluster with two routers, 3 config servers as a replica set and 4 single node shard servers. The routers and config servers are running in a Docker swarm but the shards run on ...
user avatar
  • 73
1 vote
0 answers
164 views

“Attempted to use Snappy compression, but Snappy is not installed” on Ubuntu VPS

I have set up a new VPS via Digital Ocean and have installed MongoDB V4.2.8 on an Ubuntu server 18.04 release as per the official Mongo documentation. I'm using Compass version 1.21.2. I have managed ...
user avatar
1 vote
1 answer
925 views

Impossibile to replicate MongoDB

we are trying to move a MongoDB from an AWS VM to an on premise machine. The MongoDB data directory size is over 2.5TB. The idea is to put the on premise VM in replica with the AWS VM. The problem is ...
user avatar
  • 31
1 vote
0 answers
944 views

Adding Mongo WiredTiger node to MMAPv1 replica set leads to "No keys found for HMAC"

I have a 3-node Replica Set (primary + 2 secondaries). They are all running Mongo 4.0.18 using the MMAPv1 engine. I am trying to switch the replica set over to use WiredTiger. I read through the ...
user avatar
1 vote
0 answers
259 views

For authentication of MongoDB: How to limit the number of login attempts? How to set session timeout?

I am designing security policies for databases. Is there any way to limit the number of login attempts to protect DB from brute-force attacks? For example, user have to wait for 2 minutes after 3 ...
user avatar
  • 11
1 vote
1 answer
6k views

MongoDB keeps failing on startup with exit code, status=100

Everytime I start MongoDB, it runs for about 1 second before crashing with the following error: Active: failed (Result: exit-code) since Thu 2020-03-12 09:47:17 EDT; 6s ago Docs: https://docs.mongodb....
user avatar
1 vote
0 answers
1k views

MongoDB - collections and documents lost/disappeared in replica set

I was running three mongo (4.0.4) containers within docker with configured replica set over 10 months without having any problems or issues. Primary mongo container/replica set was connected with ...
user avatar
1 vote
0 answers
73 views

MongoDB connection initialisation delay on certain Windows 10 devices

Ref: https://stackoverflow.com/questions/58856620/mongodb-connection-initialisation-delay-on-certain-windows-10-devices System info OS Name: Microsoft Windows 10 Enterprise OS Version: 10.0.17134 N/...
user avatar
1 vote
0 answers
3k views

Installing repos with https breaks yum on CentOS

We have a very similar problem to https://stackoverflow.com/questions/48320850/installing-epel-repository-on-centos-7-breaks-yum-functionality/58177576#58177576. I've seen several pleas for help as I'...
user avatar

1
2 3 4 5 6