PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Monday the 2nd of June, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:29:30] <Lawhater> Hello, is pymongo same as mongo?
[00:29:31] <Lawhater> or?
[00:29:45] <Lawhater> I am trying to install mongo on my computer.. I have the zip file but I dont know where to go from there.
[00:30:42] <deepy> Did you consult the documentation?
[00:30:52] <Lawhater> I am stuck at the PATH part
[00:30:58] <Lawhater> and I dont know what would be a good place to put the file
[00:30:59] <Lawhater> folder*
[00:31:36] <deepy> Which PATH part? dbpath?
[00:32:26] <Lawhater> one sec
[00:33:25] <deepy> And pymongo is for making python talk to a running mongodb
[00:33:27] <Lawhater> I will just install brew and then install it that way i guess
[00:54:59] <SirFunk> anyone know if with the mongo-org package on ubuntu if it is possible to disable the mongodb server from autostarting
[01:03:02] <proteneer_osx> so apparently the root role is really not a root role
[01:03:03] <proteneer_osx> since it can't add new users
[01:03:04] <proteneer_osx> wtf
[01:04:43] <proteneer_osx> and mms backup is so ungodly confusing
[01:08:25] <proteneer_osx> and apparently I created a user that isn't a userAdmin
[01:08:28] <proteneer_osx> and root isn't a userAdmin
[01:08:29] <proteneer_osx> ffs
[01:10:17] <proteneer_osx> now i need to blow away my db and start fresh?
[01:10:34] <SirFunk> root role can't add users?
[01:11:06] <SirFunk> it's supposed to include userAdminAnyDatabase
[01:18:54] <proteneer_osx> root does not include the ability to insert data directly into the system.users and system.roles collections in the admin database
[05:35:20] <narutimateum> anyone here?
[05:35:40] <narutimateum> what are alternatives to join in mongo?
[05:36:14] <lqez> narutimateum: alternatives... just saving duplicated data.
[05:36:24] <narutimateum> what are alternatives to join in mongo? i need the stores in here http://i.imgur.com/rFiqKbU.png to have info of these http://i.imgur.com/1ZlfLmS.png
[05:37:02] <narutimateum> iqez refer the screenshot.. any idea to handle that?
[05:37:23] <narutimateum> lqez:
[05:37:25] <lqez> nope, join results in application level. (e.g. web frameworks)
[05:37:32] <narutimateum> owh
[05:37:33] <narutimateum> okay
[05:38:27] <lqez> narutimateum: btw,
[05:38:51] <lqez> it would be better record the ObjectId of referenced objects, not just _id integer value.
[05:39:22] <narutimateum> that is just mock data..i cant duplicate that in the json generator
[05:41:32] <lqez> anyway, mongodb (currently) does not support any join operation(as you know), so we have to
[05:41:39] <lqez> 1. duplicate data
[05:41:47] <lqez> or 2. do more queries
[05:41:52] <lqez> sob sob
[05:43:14] <narutimateum> so okay..do more queries then
[05:43:49] <narutimateum> what actually good in mongodb?..why do we use it...
[05:44:03] <lqez> it's case by case,
[05:45:35] <lqez> and 'no join' is not only problem of mongodb
[05:46:09] <lqez> Many key-value or document based database have no support for joining.
[07:30:45] <Viesti> Hi, I was reading about bulk updates: http://blog.mongohq.com/bulk-updates-for-all/
[07:32:09] <Viesti> we'r using mongoimport at the moment, after a quick glance it seemed to me that it doesn't use the bulk import API, could someone confirm if I'm right or totally wrong :)
[07:56:41] <Ponyo> In order to get real high availability out of a 3 node replica set, do I need to run the mongos router on each node as well?
[07:57:35] <rspijker> Ponyo: you don;t need mongos for a replica set…
[07:59:19] <Ponyo> So when I connect to the secondaries using the mongo client and try to write, i get the error they aren't the primary, how does one use a replica set appropriately if only one can do writes at a time and the others aren't forwarding the writes to the master?
[08:00:11] <Ponyo> that is, if I can't use round robin to achieve fail over, then how does the application client know which is the master accepting writes?
[08:02:47] <rspijker> Ponyo: connect strings, think the driver just figures it out
[08:02:53] <rspijker> you do have auto failover
[08:02:57] <rspijker> you just cant write to secs
[08:03:01] <rspijker> gotta run bbl
[08:16:45] <Ponyo> Does mongos work more like a proxy or a lookup server?
[08:43:32] <rspijker> Ponyo: mongos knows how data is distributed across shards. It’s a router that does aggregation of results etc.
[08:44:04] <rspijker> in a replica set, data is not distributed. The same data is on all of the nodes (normally), so when one fails another can take it’s place without problems.
[08:44:36] <rspijker> shards is partitioning, so each shard (which is usually a replica set) contains a part of the data
[08:44:55] <kali> it also colate partial results from two shards when needed
[08:45:02] <kali> two or more
[08:45:31] <rspijker> you query against the mongos and it knows where to go and get the different data. It also handles the underlying querying for you. So it will ask the relevant shards for the data, then stitch it together and return it to you as if you had just queried a single DB
[09:21:12] <AlexejK> With a single mongod, is it possible that when one of the DBs is getting heavy writes (or doing MapReduce), the reads from others are affected? I know that its Single Write-Multiple Read locks but I'm observing this problema nd trying to see if this is somewhere on Mongo side or my webapp (performance is affected even when i do an operation through console)
[09:21:45] <Ponyo> I read that a replica set can't have more than 12 members, does this include config servers? I also read that I need 3 config servers per shard, so does that mean the total max size of a replica set is actually 15 servers including it's config servers?
[09:22:03] <kali> Ponyo: ho, my, this is wrong on so many levels...
[09:22:14] <Ponyo> kali: gotta start somewhere :)
[09:22:23] <kali> Ponyo: go back to the doc, you're way confused
[09:22:23] <rspijker> Ponyo: config servers are not part of the RS, furthermore there are 3 per CLUSTER, not per shard
[09:22:50] <Ponyo> Config servers store metadata for a single sharded cluster. Each cluster must have its own config servers.
[09:22:56] <Ponyo> http://docs.mongodb.org/manual/core/sharded-cluster-config-servers/#sharding-config-server
[09:23:15] <Ponyo> someone might wanna work on the wording of that then, I find it confusing as all getout
[09:23:21] <rspijker> AlexejK: some locks are still global, unfortunately
[09:24:42] <kali> AlexejK: heavy load will affect performance, regardless the locks. for instance, if you're mapreducing a whole collection, you're impacting the cache distribution and that will degrade the read performance
[09:24:58] <AlexejK> kali: even ona different DB?
[09:25:02] <kali> AlexejK: of course
[09:25:07] <kali> AlexejK: the cache is system wide
[09:25:21] <kali> AlexejK: the disk access are by definition limited
[09:25:33] <kali> AlexejK: mongostat may help you diagnose the problem
[09:25:52] <AlexejK> kali: got it. So to mitigate that, what is the best thing to do? shard + high IOPS?
[09:26:01] <kali> AlexejK: first, diagnose the problem :)
[09:26:36] <AlexejK> got it :-) ty
[09:27:15] <kali> AlexejK: then, fish for low hanging fruits: queries with missing indexes (the log will show you slow queries) or map/reduce that can be replaced by aggregation framework
[09:28:43] <kali> Ponyo: you will find a form in the low left corner to report a documentation page that you find confusing
[09:29:16] <Ponyo> ty
[09:39:49] <AlexejK> kali: Thanks, we looked into that a while back but deffo worth looking into, thanks
[11:41:49] <gancl> http://stackoverflow.com/questions/23993558/node-js-mongodb-cursor-each-get-empty-cant-run-in-sequence Hi! How to let mongodb cursor.each(function (err, docs) run in sequence?
[12:29:58] <kali> gancl: not sure i understand the question, and the code formatting is off in your question
[12:45:27] <gancl> kali: Thanks! I solved by using "cursor.toArray"
[12:51:49] <Repox> Hi guys. I'm trying to add a replica with rs.add(). Isn't it possible to add the username and password for authentication?
[12:52:20] <Repox> I'm trying to do rs.add('10.0.3.50:27017')
[13:07:51] <jackw411> anybody got a guide for mongo on ec2 and being able to connect remotely? having difficulties!
[13:18:05] <rspijker> Repox: you don’t add creds there, you use keyfiles
[13:27:10] <Ponyo> Is there a limit to how many times you can shard?
[13:29:04] <Repox> rspijker, keyfiles?
[13:30:31] <rspijker> Repox: http://docs.mongodb.org/manual/core/authentication/
[13:30:44] <rspijker> check the “Authentication Between MongoDB Instances” section
[13:31:35] <rspijker> Ponyo: not that you will ever hit
[13:37:50] <hactor> Folks if you have an AGPL source, and it's interfaced to an Apache License source, and the latter is interfaced to you code, aren't you still bound by the AGPL?
[13:41:37] <rspijker> hactor: that’s fairly off-topic… not that I mind particularly, you’re just not very ;ikely to get a proper answer
[13:54:40] <Ephexeve> Hey guys, I wonder what's the best way for me to check if the user exists in mongoengine before loggin in? Is it like this? http://docs.mongoengine.org/tutorial.html#accessing-our-data
[13:54:44] <Ephexeve> Say I have milions of users, woudn't that be tiring?
[14:00:04] <hactor> rspijker, it's the scheme used by MongoDB, I don't think it's been proven in court.
[14:07:34] <rspijker> hactor: ah, didn't know that :)
[14:09:12] <jackw411> is there anything i need to do to make mongo accessible externally on a port on a server?
[14:09:13] <hactor> Basically MongoDB itself is AGPL.
[14:09:23] <hactor> And the drivers for it (from same team) are Apache License.
[14:09:39] <hactor> However from the AGPL it follows the drivers are bound under the terms of the AGPL.
[14:09:55] <hactor> So technically MongoDB can sue themselves. And win and lose at the same time.
[14:10:07] <kali> jackw411: check out 1/ the firewalling rules in your security groups, 2/ the presence of a "listen" directive in your mongo configuration
[14:11:32] <kali> hactor: I don't think AGPL is "catching" through the network :)
[14:12:16] <hactor> It was normally defined to do so I think.
[14:15:13] <kali> mpfff. sorry, please disregard my comment.
[14:16:06] <hactor> :)
[14:18:02] <rspijker> can the drivers be considered as derived works though?
[14:19:15] <kali> can I pass ? don't you have a relevant^W techical question instead ? :)
[15:09:03] <betty> Can anyone here help with the rmongodb driver for R?
[15:27:43] <cheeser> /7/6
[15:40:45] <ehershey> /5/4
[15:44:13] <Repox> Hello. Some input on the error I get here? http://pastie.org/private/9c2n6txumvv6otc85jgmjq - I really can't get it to work.
[15:54:12] <rspijker> Repox: you have an even number of members...
[15:54:20] <rspijker> add an arbiter or another secondary
[15:55:21] <rspijker> and you might have some timing issues across servers or something causing the rollback to fail
[16:08:37] <Repox> rspijker, how do I add an arbiter?
[16:09:04] <rspijker> an arbiter is a ‘special’ mongod process
[16:09:10] <rspijker> only it never gets any data
[16:09:21] <rspijker> you can use rs.addArb
[16:23:33] <doug1> Need a little help with authentication...
[17:10:22] <mikehelmick> Hello, I had a question about aggreate that isn't quite clear to me
[17:10:42] <mikehelmick> Does aggregate overwrite data in the collection?
[17:12:49] <kali> mikehelmick: http://docs.mongodb.org/manual/reference/operator/aggregation/out/#behaviors
[17:13:02] <kali> mikehelmick: if you use $out to an existing collection, yes it does
[17:13:42] <kali> mikehelmick: the aggregated collection stays untouch
[17:22:00] <mikehelmick> kali: When aggregating a collection — if I try to aggrgate it again it returns a different result
[17:22:03] <mikehelmick> I'm limiting
[17:22:13] <mikehelmick> And then it limits the actual document one sec
[17:23:29] <mikehelmick> kali: https://gist.github.com/michaelhelmick/c732d68af1f1f1b356e9
[17:24:02] <mikehelmick> `messages` is a subdocument in each `message` document
[17:25:23] <mikehelmick> kali: I have 1 document, and 30 subdocuments in that document.. when i limit the result of the aggregation, then do..
[17:25:34] <mikehelmick> db.messages.find_one(….)
[17:26:07] <mikehelmick> That cursor only has the number of subdocuments that I previously limited in the aggregation
[17:26:34] <kali> mikehelmick: gist the full session, this make no sense :)
[17:35:30] <mikehelmick> kali: https://gist.github.com/michaelhelmick/c732d68af1f1f1b356e9 I've updated the gist
[17:35:47] <mikehelmick> Not sure if you're familiar with python.. but it should be pretty readable
[17:47:16] <mikehelmick> kali: opinions?
[17:47:46] <kali> mikehelmick: lemme have a look
[17:48:07] <mikehelmick> kali: thanks!
[17:50:43] <kali> mikehelmick: i can't see any way this would overwrite the messages collection
[17:51:22] <mikehelmick> kali: Me either…
[17:51:31] <mikehelmick> Is there a way to have mongo tell me what queries are being ran?
[17:52:05] <kali> yes. http://docs.mongodb.org/manual/tutorial/manage-the-database-profiler/#profiling-levels
[17:52:59] <kali> mikehelmick: i suggest you run a count() from the shell, not for python, run the script, and check the count() again from the shell
[17:57:27] <mikehelmick> kali: fuck.. I was doing an update and $set somewhere :/
[17:57:31] <mikehelmick> Sorry to waste your time.
[17:58:01] <kali> no problem :)
[17:58:39] <kali> i was pretty it would come to something like that to be honest :P
[17:58:47] <kali> +sure
[17:59:20] <modcure> I setup a test shared environment... there is data on shared-a but not shared-b.. not sure why shared-b has no data in it. thoughts?
[18:00:21] <kali> have sou sharded a database and a collection ?
[18:00:29] <kali> s/sou/you/
[18:00:43] <modcure> yes
[18:02:08] <kali> run a db.collection.stats() and .getShardDistribution() and gist the output somewhere
[18:10:48] <modcure> kali, well dam.
[18:10:54] <modcure> stats() --> "sharded" : false,
[18:10:54] <modcure> "primary" : "config",
[18:11:30] <modcure> kali, i did this early.. sh.shardCollection("cloud-docs.spreadsheets", {username: 1, _id: 1})
[18:11:34] <kali> modcure: you need to enable sharding on the database AND then on the collection
[18:11:52] <modcure> what i did earlier... sh.enableSharding("cloud-docs")
[18:11:52] <modcure> sh.shardCollection("cloud-docs.spreadsheets", {username: 1, _id: 1})
[18:12:00] <kali> and what did it said ? :)
[18:12:14] <modcure> trying to remember :)
[18:12:20] <kali> try again
[18:12:57] <modcure> -->
[18:12:58] <modcure> mongos> sh.enableSharding("cloud-docs")
[18:12:58] <modcure> { "ok" : 0, "errmsg" : "already enabled" }
[18:12:58] <modcure> mongos> sh.shardCollection("cloud-docs.spreadsheets", {username: 1, _id: 1})
[18:12:58] <modcure> { "ok" : 0, "errmsg" : "already sharded" }
[18:13:49] <kali> ok, are you in the right database when you run db.spreadsheets.stats() ? not in the "config" database ?
[18:14:39] <modcure> kali, i was not sorry, let me trun it again
[18:16:06] <modcure> kali, http://pastebin.com/gi4tDtEY
[18:17:23] <kali> modcure: your collection is too small. you'll start to see things happening when it reach the chunk size (it should be 64MB)
[18:18:01] <modcure> kali, thanks. new to sharding.. pretty cool stuff
[18:20:30] <modcure> kali, about the sharding... mongodb uses the shared key to perform a range paritioning... about the chunks.. each chunk is consider a new partition?
[18:24:16] <kali> modcure: not sure what you mean
[18:27:48] <modcure> kali, im not sure what i mean :)
[18:39:00] <Repox> When I try to do rs.addArb() I get the message "replSetReconfig command must be sent to the current replica set primary." What does this mean and how do I fix it?
[18:47:09] <synth_> one of our servers crashed that had a mongodb set up on it, is there an easy way to import all data from the old database which we have on another drive to a new installation of mongo?
[18:52:40] <joshua> synth_: the mongorestore command has a --dbpath option to import from a data directory
[19:03:38] <synth_> joshua thanks, i'll give that a shot!
[19:12:54] <MacWinner> hi, had a quick question regaridn the steps outlined here: http://docs.mongodb.org/manual/tutorial/convert-standalone-to-replica-set/
[19:13:30] <MacWinner> in the section, "Expand the replica set", step 1, it says start 2 standalone instances.. do we need to start these standalone instances with the --replSet flag?
[19:13:51] <MacWinner> or do you just set --replSet on teh first node of the replication set
[19:18:36] <joshua> you start all the servers in your set with the same replSet value
[19:19:55] <MacWinner> thanks!
[19:21:31] <MacWinner> if the initial server has 500M of data in its collections, and you add the second item in the replica set, will the primary node be stalled until the replication is complete?
[19:23:29] <synth_> joshua: it looks like that did the trick! thank you!
[19:23:52] <joshua> You should be able to continue using it while it syncs the data, but if you want to speed it up you can possibly copy the data directory before you start.
[19:24:08] <joshua> Eh, but maybe that is more trouble than its worth
[19:24:17] <MacWinner> ahh, got it
[19:24:38] <joshua> 500M is nothing, that should be quick
[19:24:50] <joshua> I was thinking to when I did it with 100G. heh
[19:27:21] <MacWinner> haha
[20:00:21] <cpennington> what's the best way to use a c-backed version of the SON class as the document_type argument when connecting using PyMongo?
[20:00:43] <cpennington> the SON class you import from bson/son.py is implemented in python, and has a number of things that slow it down significantly
[20:17:55] <smatt706> Hello, I'm trying to adjust a centos/rhel 6 to increase the ulimit for open files and processes. I edited /etc/security/limits.d/90-nproc.conf per http://docs.mongodb.org/manual/reference/ulimit/#unix-ulimit-settings however this doesn't seem to get read unless there is also an adjustment in /etc/security/limits.conf
[20:25:51] <smatt706> perhaps the question should be directed towards the centos crowd instad. :)