[00:49:27] <fjay> random question.. if i have a secondary mongodb cluster .. that I do a mongorestore on every day from a backup... will deletes 'casscade' when i run the resore?
[00:49:38] <fjay> or.. will i need to nuke the db first.. then restore
[04:16:38] <brianpWins> After I get mongo installed on my server what steps should i take for securing it ?
[05:10:10] <alexluya> Hello,can anyone give a suggestion to prepare mongodb data for apache mahout(data mining tool)?
[05:21:30] <ron> alexluya: we don't 'interact' between the two directly.
[05:22:36] <alexluya> I know,just want to get some suggestions,
[05:23:21] <alexluya> I think,this is a real and big requirement,someone should have some experience
[07:09:35] <Gargoyle> This seems to be happening a lot since upgrading to 2.0.7 from the 10gen repo. Running ubuntu 12.04. http://pastie.org/private/i0cl5diq7wxdjwckuvgisw
[07:18:33] <Gargoyle> Is there any thoughts on reverting a database backwards?
[07:19:01] <Gargoyle> so if 2.2 causes problems, then maybe I would be forced into going back to 2.0.4
[07:19:29] <ron> funny, we're also less than a week before going live, and that's why we won't upgrade to 2.2 now.
[07:19:59] <ron> almost gave our system integrator a heart attack when I told him we need to upgrade all our servers to 2.2. :p
[07:20:36] <kali> somebody has 2.2 on prod here yet ?
[07:20:41] <NodeX> I seemlesly upgraded mine 1 day before going live
[07:20:49] <NodeX> I have 3 apps on 2.2 production
[07:21:02] <kali> I'm curious about the real impact on perf
[07:21:05] <NodeX> 2 of them I upgraded without switching sites!
[07:21:19] <ron> we have too many servers, too many configurations and too much other work to do to take the risk. we'll do it in a few weeks probably.
[07:21:31] <NodeX> kali : the only thing I have noticed so far is resident memory has dropped and virtual increased
[07:23:27] <ron> our would end up being write intensive with more users, but since we're not even live yet, there should be a very low initial load at first.
[07:26:14] <ron> that's right, kali, but in a week from now we're going out of stealth mode, so I should be able to link you guys to information about what we do then.
[08:23:05] <Gargoyle> I set it in the config, and then restarted mongo. but it was a secondary node.
[08:23:32] <Gargoyle> then all of a sudden, my apache error log filled up with connection exceptions, and I had to restart apache.
[08:24:05] <Gargoyle> Should I be checkking for the exception in code, and manually triggering a reconnect - or is this something that the driver is not handling properly?
[09:07:59] <Derick> Gargoyle: I'd rather have you test the new code if possible. In case you do send in a CS ticket, please try to create a real backtrace - one sec, will contact you in PM in a bit
[09:34:49] <NodeX> Has something changed in 2.2 with regards to safe writes, I have a query that writes the the DB then a function that reads it afterwards (for a ratings thing), if I read after I wrote with safe write on i get nothing returned, if I run the query again I get the expected results
[09:39:36] <Gargoyle> NodeX: Don't say things like that!
[09:39:49] <Gargoyle> Almost all our writes are "safe"
[09:40:39] <Gargoyle> Actually. Must check what options I am passing to update() calls...
[09:42:29] <NodeX> it seems that my upsert was not previously "safe" and the update to 2.2 made my query even faster so there was a race condition
[09:42:37] <NodeX> switched to a safe update and sorted ;)
[14:21:53] <Jester01> <kali> i don't know if the counted btree made the cut for 2.2
[14:21:58] <Jester01> I have tested, but apparently not
[14:22:06] <Jester01> anybody know what commit to look for in git?
[14:22:41] <octalmind> ok :) so - I've got a collection of 2.6 millions points with a location field containing longitude and latitude, a stopTime and a number field. I need to find the neigbors for all this points with a very limit hardware (aka my macbook pro)
[14:22:59] <Jester01> if it's already implemented, that is
[14:24:03] <octalmind> unfortunately it takes 100ms to find the neighbors for one point, and It will took me year to perform the task. I have check my indexes, but is there any way to tweak my database to speed up geo spatial query ?
[14:44:47] <Gargoyle> If I had category->item->reviews
[14:45:19] <Gargoyle> With each level being one to many (so a category has many items, and items have many reviews)
[14:47:22] <Gargoyle> Is it possible to fetch all the reviews for a categoy (which I do save in the review), but - I need the ones for a specific item to be first, and page the results!
[14:48:55] <Gargoyle> We are talking 1000's of reviews per item, so I don't think loading them all and sorting is an option
[14:50:13] <NodeX> octalmind : the only way you're going to speed it up is to use a box not a sphere
[14:50:48] <NodeX> Gargoyle : can you explain it a bit better, I dont understand what you're trying to do
[14:50:50] <octalmind> @NodeX ok thank you very much for the help :)
[14:51:27] <NodeX> on a server that wont be all that slow
[14:52:14] <Gargoyle> NodeX: Items belong to a category. and items have many reviews. When viewing an item, I want to show all reviews for that category, but have the ones for the item you are looking for, first.
[17:32:28] <Gargoyle> I think it's time to quit and have a beer!
[17:33:29] <Gargoyle> When your done building your query params array, it's helpful to actually pass it into the ->find() method! :S
[18:08:23] <Martin_> Hello guys. I'm having a bit of a problem: We just launched our social game yesterday on facebook that's using mongodb on AWS. I'm heaving a bit of a headache because we are having only ~600 player playing at the same time and ours servers are processing through the roof. But, our server is sharded in two different replica sets, and the strange part is that even though our data is split, on the servers from the first shard are bei
[18:08:30] <Martin_> have almost no requests whatsoever
[18:08:50] <Martin_> Is it a problem in PHP maybe?? or did I configure something wronge?
[18:13:46] <kali> are you sure the problem lies with a sharded collection and not an unsharded one ?
[18:14:56] <Martin_> yes, the problem lies in the sharded collection
[18:16:20] <kali> ok, what kind of queries are hammering you ? read ? insert ? or update ?
[18:27:03] <queso> When I try connecting to a remove mongodb I get: Error: couldn't connect to server ... src/mongo/shell/mongo.js:93 exception: connect failed Could I have some help diagnosing this?
[19:51:09] <wereHamster> vicelow: you know how to do it in the mongo shell?
[19:53:19] <vicelow> wereHamster, yes but the problem is there are a lot of data in this document, then If I get all the data the query is too slow I would like to do the query using $gte and $lt but I dont know how
[19:56:30] <wereHamster> vicelow: if you know how to do the query in the mongo shell, then you also know how to do it in mongoose
[19:59:30] <sqwishy> Is there a more efficient way to write this query? http://pastebin.com/CPhmSV6N
[20:00:07] <sqwishy> The ors should be in a list ...
[20:27:22] <vicelow> wereHamster, but I don't know how to do
[20:27:30] <nick_h> is it possible to create an index that only includes documents that match a query? E.g. create index {foo: 1, bar: 1} on documents that match {active: true}
[20:29:45] <crudson> nick_h: sparse index will be your closest bet if you want to not index every document, but it will still be on the documents for which the index is specified, otherwise it makes little sense. If you're going to query on 'active', then include it in the index, and have a sparse one.
[20:30:48] <nick_h> crudson: i considered a sparse index, but that'll still index the docs that have "active" set to false, which is a waste of RAM
[20:31:57] <crudson> nick_h: is it possible to represent 'false' for those documents by just not having the attribute?
[20:32:21] <nick_h> crudson: it's possible, but would be a really ugly hack
[20:32:54] <nick_h> and would require additional update queries to implement
[20:33:29] <vicelow> nick_h, I get all the data with this
[20:34:01] <nick_h> vicelow: that's what you asked for about 50 minutes ago..
[20:36:31] <crudson> nick_h: I appreciate that, but your primary concern re. your document structure is how it is going to be used. If it's deemed correct to have false/true for that key then you won't be able to sparsely index on it, I'm afraid.
[20:37:19] <nick_h> crudson: yeah, i understand. thanks for your advice here, mate
[20:38:41] <crudson> nick_h: anytime. How many docs in the collection, out of interest?
[20:40:09] <nick_h> crudson: only 83K at the moment: http://pastie.org/private/otbf6ts9boa2iqqmn8eoya
[20:40:31] <nick_h> crudson: but it's going to expand quickly, and exponentially
[20:46:56] <crudson> nick_h: I hear you. those are very small documents, but it's the count obviously that impacts index size. It's good you're thinking about it in advance.
[20:48:50] <nick_h> crudson: that average size doesn't seem right, actually. here's an example doc in the collection. that's a lot more than 289 bytes, no? http://pastie.org/private/o2ao25fkyf2qeokyhk3ttq
[20:49:49] <tanob> hey guys, I'm using Ruby's Mongoid and i see them recommending some options but I can't trace them to the gem, I believe the safe options are passed to Mongo and I can't find the official doc about the options, do you know where can I find?
[20:49:58] <crudson> nick_h: well objectid is 12 bytes, couple of booleans and a string
[20:58:10] <icenine457> can anyone explain why this query is throwing "can't have . in field names" when im clearly trying to use the positional operator? db.surveyTemplates.update({'QuestionConfigurations' : {$elemMatch: { 'Title' : 'PreferencesCollegeLevelSpanishCourses'} } }, {'QuestionConfigurations.$.Options' : 'Options:0~1~2~3~4~5~6~7~8~9~10~11+'}, false, true);
[21:01:42] <icenine457> http://pastie.org/4642320 here's the query cleaned up a bit also
[21:07:52] <crudson> icenine457: First comment is $elemMatch with a single item makes no sense. Just do {'QuestionConfigurations.Title':'PreferencesCollegeLevelSpanishCourses'}
[21:09:45] <bcardarella> Where is the mongo db stored by default?
[21:11:56] <icenine457> crudson: i did that first but got the same error
[21:12:39] <nick_h> bcardarella: check your MongoDB config file for the "dbpath" setting
[21:13:12] <bcardarella> nick_h: I have that and in that path there is only mongod.log
[21:13:28] <bcardarella> nick_h: this is on linode and they lost power, when it came back the data directory is gone
[21:13:30] <_Tristan> if I have some users, and they look something like this: {name: "Tristan", pets: {cats: 2, dogs: 1}}, can I select all users with one or more cats?
[21:13:39] <crudson> icenine457: I also think you probably want to use {$set:{'QuestionConfigurations.$.Options' :'Options:0~1~2~3~4~5~6~7~8~9~10~11+'}}