[11:51:53] <og01> is it possible to have mongod run with a replSet without setting it via commandline argument? i can seet replSetName as a config option, but rs.initate() still says server is not running with --replSet
[11:59:55] <og01> ok so, seems the documentation expects a yaml config file, yet the config file which came with my system is more ini style or something
[12:00:29] <og01> was there a move to yaml somewhere around 2.3ish?
[13:37:35] <natefinch> Hi all, Juju dev here. We install mongodb on AWS instances (among others) and we think we're running into a situation where the default oplog size (5% of disk) is taking a really long time to allocate due to amazon's really slow disks. Juju's usage is typically a really small DB, probably never more than 1GB. Do we really need a huge oplog? Is there some other heuristic we could use than percent of total disk?
[13:49:54] <Number6> natefinch: Do you need the redundency offered by a large oplog?
[13:50:56] <Number6> redundency including a large amount of breathing room, should a replicaset member go down
[13:52:52] <natefinch> Number6: we do use replicasets... I don't know enough about the oplog to know how the size affects redundancy
[14:18:43] <Number6> natefinch: Do you have a rough idea of how much "churn" you go through - so updates, inserts, deletes, that sort of thing.
[14:34:25] <Scarzer> I had a pretty catastrophic HDD failure on one of the MongoDB binary DB files, where let's say I have DBFile{0..20} the 13th one failed. IS there any way that I could recover the data?
[14:34:41] <Scarzer> The 13th file is pretty much non-existent due to I/O Errors
[14:37:19] <natefinch> Number6: depends a lot on the deployment. an environment with 5 machines vs. 5000 is a big difference. However, most deployments stabilize after initial setup with only a very small number of further DB updates.
[14:43:52] <remonvv> natefinch: What is your typical repset size? I'm quietely assuming it's nowhere near 5000
[14:44:55] <remonvv> natefinch: There's a practical upper limit to the size of a single repset and in my experience you need about 2-3 hands for that number.
[14:45:31] <remonvv> natefinch: I think the hard upper limit is 12 iirc
[14:58:06] <natefinch> remonvv: sorry... that's number of machines in the juju environment... the mongo replicaset is configurable by the end user, but we think most people will be fine with 3 voting machines, 5 on the outside for really paranoid people
[14:58:28] <Zelest> best quote today "on a webscale from 1 to mongodb..." :D
[15:01:06] <natefinch> Juju is an application that controls a cloud environment, bringing up and down machines on which it deploys services - it uses mongodb to store the desired state of the world. We only recently started supporting Mongodb in a replicaset, and are still working through the various differences that causes our system.
[15:26:33] <ome> Where can I read about designing a good mongodb based database?
[15:33:31] <sweb> is mongo indexes like mysql 5.6 index mechanism ?
[15:33:50] <Zelest> what is mysql 5.6 index mechanism like?
[15:37:21] <sweb> Zelest: biggest improvement is for push down ... seperate lookup index in mysqld and engine index lookup ... you dont need to create compound index for many cases
[15:37:56] <sweb> mysql and it's engine lookup separately using different index on each column
[15:38:41] <simonstern> hi, i am looking for a really simple tutorial on how to register users to a small mongodb database and sign them in via a website
[15:39:50] <ome> simonstern: Just go with a SQL database.
[15:40:03] <simonstern> is there a simple tutorial for that
[15:43:03] <simonstern> so i registered for mongodb cus someone earlier said it was easiest, and i would like to have that database handle the chat
[15:43:04] <ome> simonstern: For a chat, I would consider using a SQL database for my user management, and use Redis (or similar) for the chat logs.
[15:43:21] <ome> I love mongodb, but it is not really the right tool for that task.
[15:43:27] <simonstern> why not, if you don't mind me asking?
[15:43:35] <simonstern> every time i ask someone points me to a different framework :(
[15:44:34] <simonstern> and would i be able to get free hosting of an sql database? i just want to be able to talk to other devices
[15:45:17] <ome> simonstern: MongoDB is a Document based database, it is for structures that are complex enough that SQL is not good anymore but yet not too complex to consider Graph based database solutions.
[15:45:42] <cheeser> which has no bearing on a chat server...
[15:46:01] <cheeser> mongo is a perfectly suitable choice
[15:46:57] <ome> It is suitable. But there is better options.
[15:47:09] <ome> I suggested Redis because of it's Pub/Sub.
[15:47:29] <cheeser> "better" is subjective and vague
[15:47:44] <simonstern> if mysql is easier for learning and getting that registration/login up and running i'll gladly switch
[15:47:45] <ome> And SQL for user management because you will have a strict Registration form most probably, anyways.
[15:47:56] <ome> cheeser: I give my reason for the "better". :)
[15:48:07] <simonstern> but literally every day i come on irc and ask questions i get redirected to another framework so i am not raelly getting anywhere
[15:48:49] <cheeser> simonstern: you should just pick something and run with it.
[15:48:58] <cheeser> if you're learning, all experience has value.
[15:49:01] <simonstern> gonna stick with mongodb :)
[15:49:51] <simonstern> the trouble is finding a tutorial at my experience levle
[15:50:22] <ome> simonstern: How much Node.js (JavaScript) Do you know? Just looking at the Mongodb drivers for Node.js should get you strated... really.
[15:50:40] <ome> simonstern: Also, as you're learning, consider something like Ember.js or Angular.js for your frontend as well.
[15:51:28] <simonstern> haha the rabbit hole never ends :p
[15:51:32] <ome> simonstern: Also, look into socket.io :)
[15:51:41] <ome> simonstern: Never. It is like, a.... rabbit hole.
[15:52:24] <simonstern> ah my chat is actually built with socket.io not node.js
[16:05:24] <sweb> i have very large collection i think will be about 300,000 rows per day ... index on time,tags,categories,field1 ...
[16:05:25] <simonstern> can i use mongoose for socket.io?
[16:05:37] <sweb> i need to be sharding for my use case ?
[16:07:49] <yauh> I am trying to figure out how to make mongos highly available. Would you put a loadbalancer in front of it? I am trying to get rid of the single point of failure but fail to understand how my application can access mongos regardless whether a node goes down
[16:09:01] <yauh> I assume I should do IP failover, any other advise?
[16:18:30] <kali> yauh: one simple approach is to have a mongos on each app server. if the node goes down, it no longer matters much
[16:18:49] <kali> yauh: apart from that, i think you can specify more than one mongos in the connection string
[16:19:18] <yauh> @kali I didn't know I could specify multiple mongos, that is interesting and might save me from IP failover setups :)
[16:20:08] <yauh> Just came across this: https://groups.google.com/forum/#!topic/mongodb-user/DX071fhARqk
[16:20:22] <yauh> basically having mongos on the application server might be ideal for my needs
[17:31:05] <kmac> is there a way to create a role using a regex for a database prefix? ex, read access for all databases starting with "prod_"
[17:38:00] <Scarzer> kmac: The way that I would approach that is to write a script either in Javascript(node) or Python (whatever library Python uses) that uses the runCommand. It would programmatically read all of the databases that are in and generate the command that you need for all of them.
[17:38:14] <Scarzer> That might be roundabout, but that's how I'd do it. If there is a better way of doing it, I don't know.
[17:38:40] <kmac> so then whenever a new prod_ database is brought up, the access would have to be added for it as well
[19:02:08] <therealkoopa> I'm trying to track down a problem where a subdocument had a bunch of missing fields, and I'm trying to see if it happened to any other documents.
[19:02:37] <therealkoopa> Should this query https://gist.github.com/anonymous/65a43c8d5c1541b35d27 find all subdocuments with a missing id?
[19:11:37] <therealkoopa> Oh, I figured it out. Switch the $exists around.
[21:29:03] <kali> MANCHUCK: so you need to use { $unwind : "clicks" }, { $group: { _id: "all", total_clicks: { $sum: "clicks.clicks"} } }
[21:31:37] <kali> MANCHUCK: and i think you're right about the documentation being misleading here. feel free to report it (button is at the bottom left)