PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Monday the 2nd of July, 2012

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[02:55:34] <freezey> seems that my db keeps getting *** glibc detected *** mongod: invalid fastbin entry (free)
[02:55:39] <freezey> and segfaulting
[03:03:49] <wereHamster> freezey: which distro are you using?
[03:03:55] <freezey> centos
[03:03:57] <freezey> 6.2
[03:04:00] <freezey> i think its just cent 6.2
[03:04:26] <wereHamster> how old is that?
[03:05:57] <freezey> 6.2? december 2011
[04:30:11] <freezey> wereHamster: know of anything?
[04:30:15] <freezey> atleast heard of?
[04:31:41] <siva> anyone has reference to data modeling with nosql
[04:31:41] <siva> ?
[04:33:12] <jwilliams> when using skip, limit function, is it possible the docs read size would be smaller than limit specified? for example, spcifying limit 10000, but only 5000 result are actually read.
[04:34:14] <siva> Thinking to create a skill matrix model using mongodb any ideas?
[04:40:01] <ron> siva: data modeling can change between different nosql database. normally, you should model your data to make querying easier.
[04:42:15] <siva> Ron, Thanks. I'm just planning to use mongodb as it seems to be easier and it can work with C#
[04:42:52] <ron> siva: well, I can rant about the usage of C#, but I'll give you a pass on it ;)
[04:43:30] <siva> :( Example, I would just go to have a model Person->Skills->Technical->Competency Level
[04:43:56] <siva> Person->Skills->Soft Skills->Communication->Competency Level
[04:43:59] <siva> like that
[04:44:29] <siva> Since I'm just a starter and have explored the basis of MongoDB using Mongly not sure the right way to adapt it
[04:44:57] <wereHamster> freezey: no idea
[04:45:13] <ron> again, don't think about how you'd like to store it, think about what kind of queries you'd like to run.
[04:48:40] <siva> ron, ok.
[04:48:55] <siva> Ron, Do you have reference which you can suggest me?
[04:49:09] <ron> siva: it's easy to get lost with it initially, just try to open your mind.
[04:49:12] <ron> siva: sec
[04:49:58] <ron> siva: have you gone through this: http://www.mongodb.org/display/DOCS/Schema+Design ?
[04:50:28] <ron> note that there are references at the end of the link as well.
[04:50:43] <siva> ron: No, sure will go through them.
[06:01:08] <calvinfo> has anyone here had a corrupted collection which makes the cursor run in a loop?
[06:01:25] <calvinfo> I think the repair and compact commands also end up running in a loop over it
[07:37:15] <[AD]Turbo> hola
[07:41:25] <skython> Hi, is it possible and a good idea to deliver mongodb bundled with a node.js application? I'm looking for a way to build a ready-to-use installation for my app which is using mongodb
[07:52:47] <wereHamster> skython: make a server image, complete with mongodb, node and all other dependencies
[07:54:04] <skython> You mean an image for a virtual maschine ? I would prefer a native way of installation for each platform
[07:54:57] <wereHamster> 'native'?
[07:56:26] <skython> making an installation wizard for windows, providing a package repository for debian and a dmg for OS X
[07:57:40] <skython> I just need to know if mongodb is easy to bundle without a seperate installation
[07:58:34] <wereHamster> mongod is a single binary file
[07:58:40] <wereHamster> so yes, it's quite easy to bundle
[07:59:14] <skython> that sounds good, so just a static compiled binary? thats really nice :)
[08:00:19] <wereHamster> skython: see for yourself. Download the tarball and look inside it. It's not rocket science.
[09:20:28] <stevie-bash> Hello, I just started to use mongotop and I wonder why the local.oplog.rs has a read perfomarnce of 2000ms
[09:23:42] <stevie-bash> we use a separte journal disk (ssd) and the iostats are 0-2% util.
[09:47:56] <W0rmDrink> Hi
[09:48:13] <W0rmDrink> when I turn on full journaling on ext4 shouldl I disable journalling on mongo ?
[09:48:23] <W0rmDrink> full data journaling
[09:49:30] <mids> W0rmDrink: no
[09:49:39] <W0rmDrink> why not ?
[09:52:01] <gigo1980> hi i have an problem i have some documents with microtime (unixtimestamp), how can i add to each document an date ? entry. is there an query posible, that can do this
[09:53:04] <mids> without journaling data is only written to disk every 60 seconds
[09:53:38] <W0rmDrink> so mids - ext4 full data journaling wont journal mmap updates is the assumption ?
[09:53:57] <calvinfo> if I am missing a datafile, is there any way to force mongo to continue without it and boot anyway?
[09:54:22] <mids> W0rmDrink: dont think so
[09:54:55] <W0rmDrink> mids - if I run mongo without journaling - how much data can be lost - given I keep sync to 60 seconds ?
[09:55:19] <W0rmDrink> I would assume all records that were updated before last sync ?
[09:56:00] <mids> W0rmDrink: not 100% on the internals, but that sounds plausible
[09:56:13] <W0rmDrink> let me ask on mailing list
[10:50:37] <W0rmDrink> When mongodb updates data files - it does this by just changging the mmaped location ?
[12:01:27] <jondot> hi all, anyone knows how best to handle using unicorn (ruby) and mongodb? the sample https://github.com/mongodb/mongo-ruby-driver/blob/master/test/load/unicorn/unicorn.rb.template encourages sharing one global variable
[12:22:01] <skot> W0rmDrink: no, it just updates the data in memory
[12:22:22] <skot> the os flushes from mmap virtual addresses to files.
[12:22:33] <W0rmDrink> skot, thanks, actually saw good explanation in video on journaling
[12:22:55] <skot> yep, much more detail there
[12:27:20] <W0rmDrink> it was just the guy said the journal is written before DB - and was not sure how exactly they manage that - since reads are llike read commited - but he soon after explained they mmap the data files 2x
[12:30:25] <FerchoDB> Hi. What is the best way to query the union of an array element of a collection of documents? I mean, I have a collection of documents and each one has an array of Something. I want to query all the "Someghings", but I don't want an array of arrays, but just one array of "Somethings"
[12:36:56] <skot> Might be more clear with an example. Can you post samples to gist/patebin/etc?
[12:37:52] <skot> I think you want $all/in probably: http://www.mongodb.org/display/DOCS/Advanced%20Queries#AdvancedQueries-%24all
[12:40:55] <FerchoDB> You're right, I wasn't clear. I have a collection of Customers. Each Customer document has an array of Orders. I need to query all orders, but instead of having an array of arrays of orders, I just need one array containing all the orders
[12:51:18] <NodeX> that's an appside problem unless you want to map/reduce
[12:53:50] <FerchoDB> that's what I thought. I'm still with 2.0.6, but maybe the "MongoDB's New Aggregation Framework" in 2.1 will also do the trick
[13:00:42] <augustl> considering to use mongodb queries with regexps instead of a full text search engine. But that means adding indexes for all fields present in my documents, and the documents typically have many different fields. Specifically, there are groups of documents with similar fields, but the fields differ a lot from group to group
[13:00:49] <augustl> should I just use a full text engine? :)
[13:02:26] <augustl> we're talking potentially hundreds of indexes on a single collection
[13:02:34] <deoxxa> augustl: regexes are going to be craaaaazy slow if you have a more than insignificant number of documents
[13:02:59] <deoxxa> i use elasticsearch with mongodb - it's a pretty good fit
[13:03:08] <deoxxa> but there's plenty of options out there
[13:03:21] <augustl> deoxxa: I'll have hundreds or tops thousands of documents to search
[13:03:37] <augustl> that is, I'll have a gazillion documents in the collection, but the searches will always be scoped on a "foreign key"
[13:03:59] <augustl> so assuming the query planner in mongo is clever enough to filter on that "foreign key" first, it'll be relatively few documents
[13:04:16] <deoxxa> .explain() will tell you whether it is or not
[13:04:21] <mw44118> hi -- i need help understand replica sets
[13:04:49] <mw44118> i set up a replica set with one primary and one secondary. then the amazon outage killed my primary, so now my secondary is the new primary
[13:05:31] <mw44118> here is my problem: how do i configure my app that talks to mongo so that the app keeps working even after an election?
[13:05:45] <mw44118> right now, my app talks directly to the primary mongo
[13:06:25] <augustl> deoxxa: also just realized that indexes are pretty much irrelevant if it does a full regexp compare, obviously :)
[13:06:26] <mw44118> I think my app needs to talk to some kind of load-balancing thingy that
[13:07:08] <augustl> deoxxa: elastisearch looks good, thanks for the suggestion
[13:07:28] <deoxxa> yeah, it's really easy to get running
[13:07:40] <deoxxa> it eats quite a bit of ram, but is pretty quick if you can throw hardware at it
[13:08:19] <augustl> throwing hardware is both easy and cheap :)
[13:09:21] <deoxxa> yep, much cheaper than spending a couple of weeks restructuring things to work with slightly less hardware
[13:10:52] <mw44118> should i run mongos on a different box than my primary replica?
[14:09:43] <Guest66805> hallo
[14:10:14] <arkban> mw44118: yes
[14:10:39] <arkban> mw44118: think of it like your load balancer, if your primary box disappears and it has mongos, you can't connect to the secondaries
[14:31:55] <Bartzy> Hi
[14:32:07] <NodeX> Hello friend
[14:32:20] <Bartzy> What book should I read (a complete novice on MongoDB, need to evaluate it for our production (millions of users) app in the company):
[14:32:22] <Bartzy> http://www.amazon.com/The-Definitive-Guide-MongoDB-Computing/dp/1430230517/ref=pd_rhf_cr_shvl5
[14:32:35] <Bartzy> http://www.amazon.com/MongoDB-Definitive-Guide-Kristina-Chodorow/dp/1449381561/ref=sr_1_1?s=books&ie=UTF8&qid=1341238810&sr=1-1&keywords=mongodb\
[14:32:37] <Bartzy> or...
[14:32:43] <Bartzy> http://www.amazon.com/MongoDB-Action-Kyle-Banker/dp/1935182870/ref=sr_1_2?s=books&ie=UTF8&qid=1341238810&sr=1-2&keywords=mongodb
[14:32:55] <Bartzy> What's your recommendation? Read some comments and came back confused ;)
[14:33:17] <NodeX> err google !
[14:33:58] <kchodorow_> Bartzy: frankly, kyle's is more up-to-date
[14:34:03] <NodeX> Kristina Chodorow is a 10gen employee and maintains the PHP driver so her book would be gospel
[14:34:10] <NodeX> speak of the devil!
[14:34:23] <kchodorow_> :)
[14:34:37] <Bartzy> heh :)
[14:34:53] <Bartzy> So... MongoDB in Action?
[14:35:04] <kchodorow_> yeah
[14:35:08] <NodeX> I would recommend watching some webinars on the 10gen site also
[14:36:28] <Bartzy> I prefer condensed books. "MongoDB: The Definitive Guide" is not updated, or just not as updated as MongoDB in Action ?
[14:36:44] <Bartzy> thanks for the webinars tip
[14:39:44] <Bartzy> ..? :)
[14:41:36] <Bartzy> I want to add that we code in PHP if that matters
[14:42:06] <NodeX> my advice is dont use something fat and bloated in the form of frameworks if using php
[14:43:18] <FerchoDB> What is the syntax to do this, i.e compare two string against the same field? {City : /ondon/ , City: /b/}
[14:43:43] <NodeX> that's an $or
[14:43:51] <NodeX> and it's really inefficeint
[14:45:50] <kchodorow_> Bartzy: TDG is fine for general intro stuff, but it was written before sharding & replica sets were released
[14:45:51] <NodeX> db.places.find( {$or : [ { City : /ondon/ } , { City : /b/ } ] } )
[14:45:57] <kchodorow_> so those sections are a little thin/out of date
[14:46:18] <FerchoDB> thanks, I already tested it and worked
[14:46:51] <NodeX> it will work but it is very very very inefficient
[14:47:00] <NodeX> first and foremost because you dont have a prefix
[14:47:34] <Bartzy> kchodorow_: Thanks a lot for the info.
[14:48:05] <Bartzy> I have some design question. i.e. is mongo is a good fit, before I dive in into it. Hope it's fine to ask that kind of questions here.
[14:48:52] <NodeX> ask away
[14:49:05] <Bartzy> I'm part of a team that is developing a pinterest-like feature from its application photos (user-created photos). Each "pin" has likes, views, and comments
[14:49:33] <Bartzy> each pin has view counts, and if you click on it, it also shows the viewers list, a comments count, and the last 3 comments (if you click you get all of them).. same for likes
[14:49:38] <Bartzy> It's really like pinterest.com
[14:49:41] <Bartzy> But with different content :)
[14:49:49] <FerchoDB> thanks NodeX, yes I know it's going to be quite inefficient
[14:50:10] <Bartzy> We currently have around 150 million pins
[14:50:32] <Bartzy> We actually have 500 million "pins" (photos), but only 150 million of them are shared with the world, and those are the ones we will show on the pinterest-like feature.
[14:50:46] <Bartzy> Do you think MongoDB is suitable for this ?
[14:51:16] <FerchoDB> I've heard that foursquare runs on MongoDB, is that true?
[14:53:00] <FerchoDB> yes, apparently they do use mongodb
[14:53:07] <NodeX> yup
[14:53:28] <FerchoDB> wow
[14:55:27] <NodeX> parts of craigslist too
[14:55:46] <NodeX> I even think Ebay use it in their backend for somethings
[14:56:49] <Bartzy> NodeX: Any insights? :)
[14:56:54] <stevie-bash> Did I miconfigures my repset if the local.oplog.rs has read performance of 1767ms in mongotop?
[14:58:19] <NodeX> Bartzy : insights to what
[14:58:27] <Bartzy> NodeX: To my question
[14:59:10] <NodeX> what part of it ?
[14:59:56] <Bartzy> <Bartzy> Do you think MongoDB is suitable for this ?
[15:00:44] <NodeX> I do yes
[15:01:47] <JoeyJoeJo> How can I find a single field instead of an entire document?
[15:02:13] <NodeX> $slice
[15:02:28] <NodeX> or the second part of the query
[15:02:44] <NodeX> http://www.mongodb.org/display/DOCS/Retrieving+a+Subset+of+Fields
[15:02:53] <JoeyJoeJo> thanks
[15:02:53] <NodeX> ^^ google - Mongodb slice ;)
[15:03:03] <NodeX> first result!
[15:03:04] <Bartzy> NodeX: So when should one use a RDBMS such as MySQL instead of something like Mongo? Only for transactional stuff like financing and payments?
[15:03:43] <NodeX> transactions are not unique to databases or RDBMS'
[15:10:27] <Bartzy> NodeX: So.. What when should you generally use a RDBMS ?
[15:13:47] <NodeX> I never use them
[15:13:53] <NodeX> but I'm special like that!
[15:18:24] <daveluke> i wish i was special
[15:20:19] <NodeX> I meant stupid not special!
[15:20:20] <NodeX> :P
[15:41:05] <Baribal> Hi. We're having a strange problem with pymongo: pymongo.son suddenly just *vanished*. Anybody ever heard of that?
[15:42:46] <wereHamster> ask pymongo.dad where his son is
[15:43:28] <NodeX> lmao
[15:43:32] <algernon> Baribal: did you upgrade pymongo?
[15:43:47] <Baribal> Yes.
[15:44:01] <algernon> Baribal: then perhaps read the changelog or something similar ;)
[15:44:09] <Baribal> Well, uninstalled 2.2, then reinstalled it.
[15:44:22] <algernon> in 2.2, it's pymongo.bson.son as far as I can see
[15:44:46] <NodeX> anyone else get killed by the bloody leap second in their java apps ?
[15:44:46] <algernon> or hrm. fuck nows. the api docs are confusing.
[15:45:06] <algernon> NodeX: nay, but my nautilus got pegged to 100% at work :P
[15:45:42] <NodeX> I had 4 servers, one was at 29.95 load for nearly a day :S
[15:46:54] <NodeX> one I had to reboot with a 10tb raid that had never fsck'd, it took hours to come back up lolol
[15:47:58] <Baribal> Nope, no bson either...
[15:55:19] <neil__g> @NodeX big time ...
[15:55:32] <neil__g> more so than Y2K!
[15:56:17] <devastor> Hi all, I got some "DR102 too much data written uncommitted" warnings and backtraces after initial sync when it was doing the replSet initialSyncOplogApplication stuff in mongo 2.0.4. It continued and completed ok after those, though. Is there a risk that some data didn't get written properly or anything like that?
[16:02:56] <Baribal> neil__g, I'd be all for it. I know a few buildings which have a rather simple and easily detectable geometric shape, and whichs bombardment would further the cause of open sources.
[16:06:17] <JoeyJoeJo> I have a function that returns the value of a text field. When I call that function using the button next to the text field, I can get the value of the text field. If I call that function from another function I get the error "cannot get value of null". Why does that happen?
[16:06:55] <kali> wrong # ?
[16:25:23] <NodeX> ha\ha
[16:41:52] <ilb> hi, anyone using mongo gorm on grails? been running into some problems
[16:54:10] <Bartzy> what happens if I query something that doesn't have an index ?
[16:54:18] <Bartzy> it will just be slow, just like MySQL ?
[16:54:36] <Bartzy> also, creating an index on an existing collections means locking that collection? the entire DB ?
[17:00:52] <FerchoDB> does anyone use MongoVUE?
[17:03:16] <FerchoDB> ahh never mind
[17:19:13] <tystr> I'm trying to wrap my head around map/reduce….so I have a noob question: I need to sum some numbers in two differen collections then divide one sum by the other…
[17:19:24] <tystr> what's the proper approach to this?
[17:32:18] <kali> tystr: you perform both sum() separately, and then perform the division in your application code
[17:32:55] <tystr> kali yeah, that's probably how I'll do ti in the application
[17:33:07] <tystr> I'm just in the terminal right now, wanting to run some quick numbers
[17:33:54] <kali> it the same :)
[17:33:57] <kali> +is
[17:34:31] <kali> tystr: that said you can use a group instead of a map reduce, it is slightly more compact
[17:34:40] <kali> tystr: it should be enough for a sum
[17:34:43] <tystr> oh?
[17:34:47] <tystr> what do you mean?
[17:35:39] <kali> tystr: http://www.mongodb.org/display/DOCS/Aggregation#Aggregation-Group
[17:35:57] <tystr> ah the aggregation framework
[17:36:00] <kali> no
[17:36:06] <tystr> oh that's different?
[17:36:07] <kali> the old "group" operator
[17:36:23] <kali> yep
[17:36:47] <tystr> oh….didn't realize mongodb had a group operator :)
[17:37:00] <kali> it's a bit weak... it does not work on sharded collections
[17:37:18] <kali> and it has the same limitation as map reduce in terms on concurrency
[17:37:20] <tystr> kk cool. we're not sharding atm anyways.
[17:37:51] <kali> but for simple thing, it's a bit less convoluted than a full map reduce
[17:38:04] <tystr> yes, indeed
[18:30:27] <FerchoDB> in map reduce, can I filter documents before the map and reduce functions?
[18:31:06] <skot> That is what the query is, yes.
[18:33:22] <FerchoDB> I don't know why it is not working, it is returning all the documents in collection. (I'm doing tests with MongoVUE)
[18:33:51] <FerchoDB> and if i do the "query" on its own, it returns only the filtered objects. Maybe it's something with MongoVUE
[18:34:10] <mids> try it without mongovue
[18:45:27] <FerchoDB> mids you're right. In sheel it works OK
[18:45:32] <FerchoDB> *shell
[19:22:32] <JoeyJoeJo> In pymongo I want to find all documents in a collection but db.collection.find() with no arguments returns an error. What am I doing wrong?
[19:47:34] <halcyon918> if I have an index defined like {accountId: 1, status: 1} and I look up a record but JUST "accountId" (ignoring status for now), will the index still be used, or should I have a second index for just accountId?
[19:49:26] <elarson> I'm trying to fix a race condition in an application and I'm considering using find_and_modify in the pymongo driver rather than using update. Is this a horrible idea? I'm concerned this will cause more locking or something similar that could slow down other operations
[19:51:08] <elarson> the docs don't suggest that findAndModify adds any extra locking, specifically the global lock, but I'm curious if that is really the case
[19:53:45] <Bartzy> what happens if I query something that doesn't have an index ?
[19:53:46] <Bartzy> it will just be slow, just like MySQL ?
[19:53:47] <Bartzy> also, creating an index on an existing collections means locking that collection? the entire DB ?
[20:01:51] <skot> yes, no index will be slower
[20:02:19] <skot> There is a non-blocking version where you can set background index creation
[21:36:44] <JoeyJoeJo> I'm trying to do a geospacial index for a large collection. I did db.collection.ensureIndex({'loc':'2d'}) and it's just sitting there with three periods instead of a prompt. Does that mean it's working?
[21:38:28] <JoeyJoeJo> I figured it out. I was missing a closing }
[22:39:08] <dstorrs> how do people normally manage backups? We're going to have something like 5-6TB to start with, and we're adding about 10G per day
[22:40:04] <dstorrs> I'm running into issues like "S3 / CloudFiles / etc can only store 5G per object"
[22:41:25] <BurtyBB> not using S3 is part of my solution
[22:42:47] <deoxxa> dstorrs: http://rsync.net/
[22:48:25] <esad> halp! I'm getting Invalid BSONObj size: 1601332595 (0x7365725F) first element: gent: ?type=97
[22:48:30] <esad> when trying to insert something to collection
[22:48:34] <esad> even an empty document
[22:59:12] <W0rmDrink> Hi
[22:59:29] <W0rmDrink> mongo docs mention fsync allot - but does it use this or msync ?
[22:59:37] <W0rmDrink> I would think msync is more approriate
[22:59:59] <skot> yes, it is msync but logically the same
[23:00:17] <W0rmDrink> ok
[23:00:34] <dstorrs> deoxxa: aha. thanks, that's great
[23:27:29] <cgriego> Is there anywhere with download links to older copies of the deb packages? Such as 2.0.2?