New answers tagged

0

The MongoDB Extended JSON format allows representation of additional BSON data types that are not part of standard JSON. There is a subtle distinction between: being able to parse the extended JSON into a JavaScript representation the parser then taking the additional step of interpreting the extended key/value pairs into an object with associated ...


0

The file handlers are not one for each collection or index but per connection and thread: https://docs.mongodb.com/manual/reference/ulimit/#resource-utilization So in my opinion you should definitely adjust your ulimit settings. See the Production Notes, too. https://docs.mongodb.com/manual/administration/production-notes/ I think a sharded storage of ...


0

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/


0

Your code exits the loop on the first exception. Election of the new primary is not instantaneous. I think you would have to move the try catch into the loop but then you face the problem that you have to keep track of the refused records. My approach would be no for loop but taking one document off of the stack, try, wait on fail, retry, etc.


0

If you are in Windows, make sure that your lines are indented using two spaces instead of tab and include escapes for your slashes and specify a file instead of a folder. systemLog: destination: file path: G:\\NodeApps\\data\\log.txt storage: dbPath: G:\\NodeApps\\data


1

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 ...


0

I'm torn between what's better long-term for my application: let each user have just one document and for each quiz he/she creates, it will be added to the "quizData" array of objects...OR...let each user's quiz have its own document in the MongoDB, where I create the above structure for each quiz (obviously, the "quizData" will only contain one object ...


0

From the error it looks like you are hitting the mongodb's namespace limit 128 bytes. One of the namespace; may be db.collection.index is 10078 is too long thus causing this issue.


1

As I have two types of reports. Lets call them report_type_1 and report_type_2. Currently I insert both these reports in same collection. Will it make insertion any faster if I use different collections for these two different types of reports? The outcome will depend on the storage engine you are using and whether concurrency control is the limiting ...


2

The definition of the steps referenced in a chunk migration are a little fluid, and can depend on the version you are running. However, based on what you have provided I suspect that the primary on rs01 and the number of chunks you are trying to move is the source of the issue here. Last time I looked at this in detail (around version 2.6), step 2 was ...


0

You can use Talend Open Studio for this transformation process. Here is an example -- Talend ETL to migrate data from MongoDB to Postgres After that build your Talend ETL Job. Deploy the jar file to SpagoBI Server. Again here is the idea of how to --Talend ETL Job deployment guidelines Then Schedule your Job in SpagoBI Server UI admin console on a certain ...


1

You are indeed correct! It is very simple to deploy Couchbase instances and cluster them. This is because Couchbase has a single node type which minimizes configuration, like you've mentioned. What you might not know is that Couchbase has a built in caching layer, eliminating the need to install other caching services to sit next to your database. This ...


1

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 ...


1

All right. After digging a LOT I found the correct formatting is: time: {$date:"2013-11-20T23:32:18Z"} So I used 'sed' to change it throughout the json file and imported it. I'm leaving this answer for the benefit of anyone who might come across this problem.


1

You have the verbosity set to 0 overall and every individual component is set to -1, which means they will all inherit the parent verbosity setting (of 0). That is as low as the verbosity setting goes, to further reduce the logging you can set systemLog.quiet but that is not recommended for production systems because it can make tracking down issues too ...


1

Since 2.6 MongoDB supports index intersection. https://docs.mongodb.com/manual/core/index-intersection/ To my general experience your queries are not complex enough to be worried. You should of course create indices for status (especially since it is a string), customer.id, and timestamp but leave the rest to the MongoDB internals. You can of course ...


1

The dump path has to be the final argument of mongorestore. https://docs.mongodb.com/manual/reference/program/mongorestore/ mongorestore -v --db atelier2 dump/atelier should do the trick. If not the verbose flag -v should give hints to the deeper cause.


0

There are several possible reasons. Please elaborate on your problem. Use mongostat. Is your nodejs doing updates asynchronously? This would result in many operations hitting your database practically at once. Complex find queries in the Update request can take a heavy toll. If so try using an index and simplifying your queries. Maybe your Nodejs MongoDB ...


1

The short answer here is no, at least if you want to match and not just set specific elements (rather than looking to match multiple elements), something like this: > db.students.findOne() { "_id" : "abcd", "arrayItems" : [ { "name" : "Peter", "age" : 23, "profession" : "Student" }, { ...



Top 50 recent answers are included