Tag Info

New answers tagged

0

Yes definitely, NoSQL database better suits storing timeseries data than traditional RDBMS. Yes MongoDB is exceptionally adapted to this use case. -How should you structure the database? One document = one time series input VS multiple time series. The answer is to store in one document multiple timeseries. Having less documents will help the performance ...


1

MongoDB (as at 3.0) only supports a single primary per replica set. Replica sets can have up to 50 members, with up to 7 voting members. The 2-node replica sets you have described should have a third member (either a data-bearing secondary node or a voting-only arbiter) to allow for failover. Replica sets require a strict majority of votes (n/2+1) in order ...


1

For mongo shell sessions there is a concept of mongorc files which include JavaScript to execute when the mongo shell starts. You can use this feature to extend or customise the behaviour of the interactive shell. If you want secondary reads to be allowed by default for all shell sessions you can either: add the rs.slaveOk() command to the .mongorc.js in ...


1

* User - user_id auto integer - regtime datetime - username varchar - useremail varchar - userpass varchar * Question - question_id auto integer - question varchar - is_active enum(0,1) * Question_choices - choice_id auto integer - question_id integer - is_right_choice enum(0,1) - choice ...


0

When you create the self signed certificate, you need to use a valid host name in the "Common Name" field, e.g.: Common Name (eg, your name or your server's hostname) []: host.domain.com If you want use a domain certificate, you need to change "host" with "*", e.g.: Common Name (eg, your name or your server's hostname) []: *.domain.com


0

Your hostname must be an alias for 127.0.0.1 in your /etc/hosts file to make it work. aldwin@myhostname~$ cat /etc/hostname myhostname aldwin@myhostname:~$ hostname myhostname aldwin@myhostname:~$ cat /etc/hosts 127.0.0.1 localhost 127.0.1.1 myhostname


1

Reason: Is it the same version of Mongo on both servers? Record Padding : http://docs.mongodb.org/v2.4/core/record-padding/ No Padding Allocation Strategy Changed in version 3.0.0. For collections whose workloads do not change the document sizes, such as workloads that consist of insert-only operations or update operations that do not increase document ...


1

Use 'mongostat' to monitor the amount of inserts Use 'iostat -x 1' to see how much of the disk limitation is used. 'top'/'htop' to see cpy/ram limitations. 'nethogs' for network limits. If the disk limit isn't reached : Let your python script run from different locations (servers) at the same time, and see if you can increase the amount of inserts. The ...


1

I wasn't able to use wiredTiger upgrading MongoDB. However, at May 17 I uninstalled MongoDB 2.6 then installed MongoDB 3.0.3 . Immediate after the installation, I added storageEngine=wiredTiger on top of my mongod.conf file. Then I gave sudo service mongod start command and eventually I could.


1

You can combine it on 1 disk, if you wish. Not obligated to split. Journal Journal will take 3GB (or less than 400MB if you use --small-files option) Journal + Pre-Allocation Be aware. If you don't use --small-files, then at least 8GB (journal and oplog included) will be pre-allocated to your disk. This is not lost space, but just reserved to improve the ...


0

Steps for migrating 2.6 to 3.0 on ubuntu and using the new WiredTiger storage engine. backup current database mongodump --out final_2.6_backup stop mongodb service service mongodb stop Remove current database files rm -rf /var/lib/mongodb/* Edit /etc/mongod.conf to use the new storage engine storageEngine=wiredTiger Start mongodb service mongodb start ...


0

The MySQL vs. MongoDB argument is in many ways a relational vs. NoSQL argument. Each one excels in certain scenarios and is ill-suited for others. And because of their very different structures each one contains features not found in the other.


0

You can combine it on 1 disk, if you wish. Not obligated to split. The reason is to optimize the disk for the purpose. Journal is a capped collection that just writes in sequence. So less IOPS needed. And logs are logs, just adding information. And then Data, well, reading jumps around a lot, and writing sometimes also, filling up gaps that were freed. And ...


1

To see if the hardware is not limiting: top/htop => cpu percentage iostat -x 1 => sysstat tool to see disk r/w limits (%util) Concerning locking: Mongo 2.6 : database locking Mongo 3.0 + MMAPv1 storage engine : collection locking Mongo 3.0 + WiredTiger storage engine : document locking If you have 1 huge collection (server-prod), maybe Sharding is an ...


1

The array contains 348 empty documents to begin with, and over the course of a week these array element will have sub-documents inserted (if empty) and then subsequently updated (if they already exist). The sub-documents are approximately 100 bytes in size and are not indexed. One consideration with this use case is that your documents are consistently ...


0

Consider using the MEMORY storage engine, so the changes will happen in memory. In case of a crash, you can rely on the binlog to recover the latest value. And if you have a slave, you can use InnoDB on the slave. If you want to stay on InnoDB, consider the HandlerSocket plugin. It provides an SQL-less interface to InnoDB, and it should be much faster in ...


1

You can use SolrMongoImporter Download solr-mongo-importer jar file Download mongo-java-driver jar file Place both jar's files in your Solr libraries folder Include the libraries in your solrconfig.xml Example of usage: <lib path="../../dist/solr-mongo-importer.jar" /> <lib path="../../dist/mongo.jar" /> <?xml version="1.0" ...


0

The usual reason for sharding is that your workload has exceeded the resources of a single server, so the expectation is that you would not be running mongodump via mongos for a full sharded cluster backup. Backups are instead done by stopping the balancer and then backing up a config server as well as a mongod from each shard. As at MongoDB 3.0, mongodump ...


0

The general index format used by MongoDB's included storage engines as at 3.0.x (MMAPv1 and WiredTiger) is B-tree, however there are more nuances in the technical implementation. MongoDB 3.0 introduced a storage engine API which separates the concerns of storage formats (i.e. data & index representations on disk and in memory) from the core server ...


0

I was able to make this work after altering your model. Hopefully this still fulfills the use case you are targeting. To bypass the dynamic nature of your fields, I created a field named "field" and a field named "value". This allows me to create a multikey index on known fields. db.myColl.insert( { "user_id" : NumberLong(24), "request_datetime" : ...


1

Reboot of affected shards fixed it.



Top 50 recent answers are included