12

It is just informing that mongod has chosen to use the _id index. More specifically: IDHACK means that normal query plan path (evaluation, caching, re-evaluation) was bypassed for the query shape {_id: <value>} which is supported by the required _id index. This is a performance optimization for the common use case of fetching a document by primary ...


6

As per MongoDB BOL here The maximum BSON document size is 16 megabytes. The maximum document size helps ensure that a single document cannot use excessive amount of RAM or, during transmission, excessive amount of bandwidth. To store documents larger than the maximum size, MongoDB provides the GridFS API. GridFS is a specification for storing and ...


6

Ok, I found out why. Apparently I was querying against the admin database. Always run use <db> guys


5

These files are used when the sort you are attempting in an aggregation exceeds the maximum allowed memory and you have allowDiskUse : true specified. The relevant pieces of the code are here (where the SortedFileWriter is called) and here (where the extsorter.# files are written to temp by SortedFileWriter). Basically, this is the number of files required ...


4

I think the problem you have is that the archive format created with --archive is not a tarball (and the docs don't say it is anywhere that I could find). Rather it is a custom packaging format which you can see the details of here. Based on a quick scan of the code, it looks like a lightweight format containing a series of headers, metadata which describes ...


4

As at MongoDB 3.2, this is expected behaviour for foreground index builds: By default, creating an index blocks all other operations on a database. When building an index on a collection, the database that holds the collection is unavailable for read or write operations until the index build completes. Any operation that requires a read or write lock on ...


4

What are maintenance mode tasks? The "maintenance mode tasks" message is referring to a counter of successive calls to the replSetMaintenance command and (as at MongoDB 3.4) isn't associated with specific queued tasks. The replSetMaintenance command is used to keep a secondary in RECOVERING state while some maintenance work is done. A RECOVERING member ...


4

Final solution: We went with option #2 - turning off MongoDB and manually copying the database files over to the new server. It worked like a charm. For future database migrations and changes, I will probably be making a replica set as suggested by @SqlWorldWide and @Markus. That looks like it would definitely the best solution for someone who has time to ...


4

sudo service mongo stop [This didn't work] As MongoDB BOL mongo is an interactive JavaScript shell interface to MongoDB, which provides a powerful interface for systems administrators as well as a way for developers to test queries and operations directly with the database. mongo also provides a fully functional JavaScript environment for use with a ...


3

Most likely you are using a different shell version than the db version. That is, the output of db.version() (the server version) and version() (the shell version) should be the same. For example: mongos> db.version() 3.4.1 mongos> version() 2.6.12 mongos> config = db.getSiblingDB('config') config mongos> config.shards.updateOne({_id:'shard01'},...


3

The nice part about MongoDB is that it is open source, so your answer is in the code, starting with comments about UnusedLockCleaner: Periodically purges unused lock buckets. The first time the lock is used again after cleanup it needs to be allocated, and similarly, every first use by a client for an intent mode may need to create a partitioned ...


3

What's the differences between those restore points? I guess Snapshot is fast restore, because only copy already existing files to destination. But it takes compute and storage resources the generate every 6 hours a snapshot and it will be stored only for 3 days. A snapshot is a full backup of your data captured at a specific interval. Restoring from a ...


3

This is by design. If you want to run with only one node, restart that node without replica set switch. If a majority of the replica set is inaccessible or unavailable to the current primary, the primary will step down and become a secondary. The replica set cannot accept writes after this occurs, but remaining members can continue to serve read ...


2

You'll need to rethink your shard key approach. As at MongoDB 3.2: All fields in a compound shard key must be present in all documents and will be immutable (i.e. the shard key for an existing document cannot be changed). A hashed shard key is based on a single field, and does not support range queries. It generally makes sense to have a shard key that ...


2

As at MongoDB 3.2, there is no option for the Windows MSI to only install the mongodump.exe and mongorestore.exe command line tools so a default install is the most straightforward option. Are there mongodump and mongorestore standalone tools that one could use for this or is it best to install the entire MongoDB package on our build server (which feels ...


2

db.stats() is a function call so db.stats is a function reference which has no function called getIndexes(). To get them db.getCollection("stats").getIndexes() https://docs.mongodb.com/manual/reference/method/db.stats/


2

Try db.repairDatabase() which fixes inconsistency across database. Check mongod and mongos logs for results.


2

A variety of things I would try: Polygons are using floats, is it possible x/y tiles are wrong for some points due to rounding errors inherent in that datatype (though I don't see why this wouldn't be idempotent). Runs of holes seem to follow lats rather than lons so this points more to something code related rather than db related (would expect any db ...


2

2016-08-05T15:29:36.935+0200 I COMMAND [conn39339] killcursors: found 0 of 1 As per the info you've found, this is a normal (and benign) message: no administrative action is required. This message may be logged when a client/driver issues the killcursors command (for example, when an operation reaches a cursor timeout or an active cursor is explicitly ...


2

It's hard to say without seeing all the logs, but I suspect you are seeing changes to your primary. The primary is listed in the log messages as primary: mongodb01 and it is (at the time syncing from mongodb03). It's the kind of thing I would expect to see if you were stepping down the primary (mongodb03), then locking it (or similar) that causes it to fall ...


2

First, restart the mongos process on mongosHost3, then recheck the locks as you did in the question. If the same lock (make sure it is the same and not a new lock by the same process - check the ts field etc.) is still present after that restart it is safe to remove it manually, it is basically stale and should be cleaned up eventually in any case. You can ...


2

There is no prescribed need to run db.collection.validate(true) on a regular basis for a healthy MongoDB deployment. Validation with the true or {full:true} parameter can be resource intensive, as this iterates through the collection's data & index structures. The validate(full) command is typically only used as a diagnostic aid in the event of ...


2

As at MongoDB 3.4, all of the standard storage engines (WiredTiger, MMAPv1, ..) create multiple files in the dbPath. For example, in WiredTiger there are a number of metadata files, journal files, and a file per collection and per index (see: Why is an empty MongoDB database so big?). Multiple files generally allow more granular concurrency and storage ...


2

Background indexes have their own issues as well. If you are running a replica set I would recommend to do a "rolling" build Take a secondary out of the replica set Build the index Bring the secondary back into the replica set and wait for it to sync up. I have found this to be the safest option to build large indexes in production. Before you start this ...


2

The bsondump utility converts BSON data (which is binary) into human-readable formats. Common usage would be bsondump --pretty to inspect data formatted as MongoDB Extended JSON. This can be useful for previewing data contained in BSON files as created by mongodump, replica set rollbacks, and other features (eg. auditing in MongoDB Enterprise as per your ...


2

Since nobody could find a valid reason for this issue, I opened yesterday a mongodb bug report: https://jira.mongodb.org/browse/SERVER-29326 Mongodb engineers confirmed that's a bug. Unfortunately it's not mentioned in mongodb's documentation which would have saved us many hours tracing down the issue and deploy another schema design from the beginning.


2

OK.. It's look like that you have managed to mix things. So, you have working mongodb at "C:\program files\mongodb\data" and now you want to convert that mongodb to three node replica set?!? First after you have start that mongod process with --replSet replicaSetMGL parameter. Log in (with mongo -program) and give command rs.initiate(). Then remove all ...


2

Because in at normal situation all traffic (read, write) goes to the primary node, it is the busiest node at replica set. Secondaries just replicate changes (update, insert, delete) and not responding to client queries. But check your I/O. iostat -mx 1 what are %iowait, %util. iotop program shows how much you actually read and write to disk. Do you know how ...


2

As your service mongodb status tells, your mongod process don't exists. So, if you try to connect (with mongo -program) to your mongod, you cannot. So, restart your mongod sudo service mongodb restart, try now to connect it mongo. If you want to see what happens when you shutdown, start following mongodb.log tail -f /var/log/mongodb/mongodb.log and then ...


2

I also ran into same issue. But was able to resolve by completely removing mongo first sudo apt-get purge mongodb-org* Then performing following sudo apt update sudo apt install -y mongodb sudo systemctl status mongodb You can refer to following link for the same: https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-18-04


Only top voted, non community-wiki answers of a minimum length are eligible