PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 24th of June, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[04:14:50] <arussel> how good is the definitive guide ? what version does it cover ?
[09:28:22] <luca3m> hi, I'm using MongoDB C++ driver, from branch 26compat. As I understand to connect to a ReplicaSet I need DBClientReplicaSet class? Does it already handle connection pooling?
[10:19:04] <stif> how can i delete all elements with value 3 from nester arrays? http://dpaste.com/1XFHC93
[10:27:15] <rspijker> stif: you just want to remove the 3’s?
[10:27:48] <stif> yes
[10:29:55] <rspijker> not sure if this will work: db.coll.update({},{$pull:{“values.value”:3}},{“multi”:true})
[10:30:01] <rspijker> test it somehwere first...
[10:30:47] <stif> tested, it doesnt work
[10:31:35] <rspijker> yeah, the nesting is what breaks it
[10:32:18] <stif> i have tried this > db.test.update({name:"hello"}, {"$pull": {"values": {"value": 3} }})
[10:32:47] <stif> but result is values array is empty
[10:33:18] <rspijker> yeah, that will pull any values field which has a value element of 3
[10:33:44] <rspijker> I highly doubt this is possible using update
[10:35:07] <stif> is it possible at all?
[10:35:56] <rspijker> you can always just loop over the data
[10:36:50] <stif> no way, i have to execute such query via driver in my app
[10:37:33] <rspijker> short of findAndModify or changing your data structure, I don’t see a way
[10:51:43] <jto3> Hi, I have a question about MongoDB replica set, i have simple deployment: 1 pri 2 sec in AWS, each instance is using a separate volume for mongodb store ( no raid ). Can I shutdown the primary, take snapshot of the mongodb volume and use it later as backup ?
[11:01:02] <kali> and... he left.
[11:05:23] <rspijker> his macbook got tired
[12:03:29] <mers> hi. i'd like to find mongo documents where any field contains a given value. is that possible, and could you point me to documentation for it if it is pls?
[13:39:54] <Zlati> hello guys
[13:40:21] <Zlati> I'm trying to run MMS on a virtual machine
[13:40:45] <Zlati> I understand that the hostname and the default port for mongo should be externally available
[13:41:12] <Zlati> My SysAdmin doesn't want to make this port port vizible to anyone
[13:41:33] <Zlati> We would like to make it visible only for mms
[13:42:00] <Zlati> and ofr that we will need the IP of the mms from wich it makes requests
[13:51:32] <rspijker> Zlati: this doesn;t sound right at all...
[13:51:46] <Zlati> what you mean
[13:51:53] <rspijker> the MMS agent should be able to access the mongo instance
[13:51:57] <rspijker> but you can run that locally
[13:52:19] <Zlati> right , but i have to verify the agent
[13:52:23] <rspijker> then you only need to allow that to connect to the outside (it;s not listening, so you won’t need to unlock any ports or anything, just an outbound connection)
[13:52:33] <rspijker> ‘verify the agent’?
[13:57:16] <Zlati> yes you need to verify the mms agent
[13:57:24] <Zlati> I have error Failure dialing host
[13:57:27] <Zlati> in the logs
[13:57:50] <Zlati> so mms.mongodb.com is trying to connect to that host
[14:03:19] <remonvv> \o
[14:34:14] <cek2> Target 'build/build/mongo/mongo' depends on the availability of a system provided library for 'boost_program_options', but no suitable library was found during configuration.
[14:34:24] <cek2> getting that on gentoo. what the heck does that mean?
[14:34:50] <cek2> boost 1.52.0-r6
[15:07:12] <cipher__> II'm receiving the error "Index with name: files_id_1_n_1 already exists with different options" when attempting to upload a file through a webapp running a cluster
[15:07:37] <cipher__> it's trying to create a new chunk index?
[15:13:43] <rspijker> cipher__: looks like your app is trying to create an index on a collectino that laready exists
[15:30:15] <saml> hello
[15:30:21] <saml> i have db.articles am i right
[15:30:25] <saml> each doc has author field
[15:30:44] <saml> i want how many articles each author wrote
[15:30:51] <saml> is this aggreggation am i right?
[15:31:16] <saml> SELECT count(url) FROM articles GROUP BY author
[15:41:33] <rspijker> saml: aggregate({$group:{“_id”:”$author”, “count”:{$sum:1}}})
[15:41:48] <saml> db.articles.aggregate({$group:{_id:'$authoredBy',n:{$sum:1}}}, {$sort:{n:1}})
[15:41:55] <saml> yah same thing thanks
[15:50:15] <saml> can i do nested group?
[15:51:09] <saml> aggregate({$group:{_id:{brand:'$brand',author:$author}, n:{$sum:1}})
[15:52:57] <saml> but i want result grouped by brand first and then author
[16:25:45] <agnostic_fir> hello
[16:48:13] <luser> yea
[17:04:52] <luser> hi
[17:05:00] <cek> Target 'build/build/mongo/mongo' depends on the availability of a system provided library for 'boost_program_options', but no suitable library was found during configuration.
[17:05:04] <cek> any ideas what's up?
[17:55:37] <saml> https://gist.github.com/saml/b977e48dc6aa46b0d487 how can I do this kind of aggregation?
[18:59:47] <blizzow> I'm hosting three mongo shards on a very large instance at amazon. The instance is a hidden member of each shard and I use this to do snapshots. a couple weeks ago, the replication lag started growing uncontrollably. I stopped all running mongos and try to re-add them one at a time and one shard catches up fine. The other try to start up but never catch up. IOtop does NOT show heavy usage. How can I figure out why my hidden member can't catch up anym
[19:05:48] <kali> blizzow: the master might be the cause
[19:06:03] <kali> blizzow: it may be unable to push its oplog fast enough to the secondary
[19:06:50] <kali> blizzow: the primary or the secondary you're pulling from. try to check where you're pulling from, and see if that replica is up to date with the primary or also lagging
[19:07:18] <blizzow> kali: The primary and secondaries are also at amazon and very large machines and the rest of the shard is in sync with 0 seconds lag.
[19:07:21] <blizzow> :(
[19:10:10] <saml> how can I $sort $push-ed array in aggregation?
[19:13:50] <saml> db.articles.aggregate({$unwind: '$authoredBy'},{$group: {_id: {brand: '$blogName', author: '$authoredBy'}, n:{'$sum':1}}}, {$group:{_id:'$_id.brand', authors:{$push:{author:'$_id.author', n:'$n'}}}})
[19:13:57] <saml> i want to sort authors by n
[19:17:20] <LouisT> Hi, is anyone aware of an issue tracker that uses mongodb instead of mysql? =/
[19:17:24] <stefandxm> wassup
[19:17:43] <stefandxm> anyone knows if the party tonight is worth the time?
[19:41:02] <insanidade> hi all. is there a way to avoid data going to ram memory during data insertion? I'd like to insert lots of documents and it would be ok if data goes only to disk and not to ram memory at this point.
[19:42:05] <stefandxm> :o
[19:42:21] <kali> insanidade: nope
[19:42:47] <stefandxm> i got this image flash during current mongodbworld seminar http://highlyscalable.files.wordpress.com/2012/02/overview2.png
[19:43:30] <insanidade> I'm trying to insert 500000 documents using a loop. That bloats my ram memory in 15 minutes (8G in a laptop)
[19:44:26] <stefandxm> is it swapping?
[19:46:11] <insanidade> it is - intensively. The machine goes really slow when that point is reached.I've read some documentation about it and that's the expected behavior once that inserted data goes to ram memory so that it becomes avialable. a buffer keeps growing until the server is restarted.
[19:47:39] <insanidade> I'd like to avoid that ram consuption at data insertion phase
[19:48:01] <insanidade> is there something I could set at database server side ?
[19:53:15] <Kaiju> I would just rate limit the inserting loop
[19:53:24] <Kaiju> give it time to write out to disk
[19:54:36] <insanidade> Kaiju: is there a way I could 'flush' that data and keep inserting documents? Or do I have to 'pause' data insertion from time to time and mongodb (or the OS memory management system) would handle that ?
[19:57:22] <Kaiju> insanidade: I think there is a command to make mongo write to disk, you could just wait for the callback on it. Not able to find it with a quick google. Otherwise pausing would be the best bet imo.
[19:58:33] <kali> insanidade: in a similar instance, i did use a rate limit. the thing is, mongodb does not perform much active memory management. when you insert a lot, it just writes to new adresses, letting the kernel do its thing
[19:59:04] <kali> insanidade: so basically, perform a write with a fsync write concern once in a while, a set a rate limit
[19:59:54] <kali> insanidade: if your database is also used by some other app, you'll saturate the server anyway. so the rate limit is a valid option not to ruin the performance for users on the other side
[20:00:25] <insanidade> kali: by "rate limit" you mean the data insertion rate?
[20:01:09] <kali> yes. aka "sleep in the loop" :)
[20:01:12] <Kaiju> insanidade: You could do a modulus 1000 if and have it wait for 5 seconds.
[20:01:20] <Kaiju> or however long
[20:01:34] <stefandxm> you should config it for your kernel
[20:01:57] <stefandxm> if its possible
[20:03:00] <insanidade> stefandxm: that could be done. That project is to be executed in a dedicated machine. Any documentation on how that could be done ?
[20:03:51] <insanidade> Kaiju, kali : that data insertion I'm performing is for development purposes. I'm trying to insert 500k documents but that's a small number if compared to what it shall handle when in production.
[20:04:40] <Kaiju> insanidade: Ah,I'm handling a large insert db myself. Had to move to a sharded setup to handle the flow.
[20:05:28] <stefandxm> sorry iam att mongodb world and seminar starts now
[20:06:00] <insanidade> thanks, stefandxm
[20:06:38] <insanidade> Kaiju, kali : so a simple 10 secs 'sleep' would help the OS flush stuff and allow 'insane insertion' to go on, right ?
[20:07:26] <Kaiju> test and see
[21:00:35] <Ontological> Is it possible to determine whether or not a $pull removed an element? http://pastie.org/private/nxmxccf4k45l1nu5hqyyw
[21:18:11] <Guest81602> I am having issues with using a stored JavaScript function in a mapreduce. Getting a reference error, tried using eval even that doesnt work.
[22:18:37] <joannac> Ontological: search for that document and check?
[22:19:18] <Ontological> I am aware of how to post-process, joannac :P. I've actually learned that mongo 2.6 does this with 'nModified' :D
[22:25:26] <Ontological> Oh, you guys are -org, not -10gen on your packages, now
[23:01:19] <gee> hello, i have a very wierd problem with mongodb. there are to setups: dev and production. both 2.6.1, no replica sets on both. dev setup is working well
[23:02:06] <gee> but when i`m starting application on production (java 2.12 driver) it throws exception com.mongodb.MongoServerSelectionException: Unable to connect to any server that matches AnyServerSelector{} at com.mongodb.BaseCluster.getServer(BaseCluster.java:80)