[03:43:52] <hdon> hi all :) what do you think about spitting out a warning at this line? https://github.com/mongodb/node-mongodb-native/blob/master/lib/mongodb/db.js#L2057
[03:46:25] <hdon> hmm, that doesn't quite accomplish what i want
[10:20:08] <NodeX> how many images are we talking about?
[10:21:28] <topriddy> NodeX: every user has a profile picture. so say for 200,000 users.
[10:23:04] <NodeX> you'll be fine with OS image managing
[10:23:40] <NodeX> what I do is store daily folders (for ease of backup) and also store a cache that's the last week of images
[10:24:17] <NodeX> I tested Nginx as a cache serving static images vs memcache and redis and nginx was comparable and took one less daemon out of the stack
[10:25:08] <topriddy> NodeX: if i'm storing images as encoded string in mongodb, not sure OS would help me much. except i store them in filesystem
[10:25:26] <BurtyBB> Anyone know if MMS is having problems as I'm getting a error 500 reported by the agent?
[10:26:05] <NodeX> you should use gridfs to store the images if you're going to do that
[10:26:14] <NodeX> you've got a 16mb limit on docs in straight mongo
[10:27:32] <topriddy> NodeX: yeah gridfs. read somewhere that gridfs project wasnt a priority of mongodb dev team though.
[10:28:03] <NodeX> and it's built to deal with storing files of any size efficiently
[10:31:28] <SergeyUkolov> hi all. I have one problem. In some reason mongod process doesn't want to use all RAM on our servers. It use ~20% only but we have 220Gb DB and a lot of reads. mongostat show 70-100 faults. Does anybody know why is it possible?
[10:31:47] <topriddy> NodeX: okay. would look at the docs. i'm working with Java and morphia though. And i'm sending the images as binary encoded string from a mobile app
[10:32:06] <NodeX> topriddy : it's easy enough to decode back to a temp file ;)
[10:32:34] <SergeyUkolov> btw, I just run touch command on big collection with loading both indxes and data and I still see 20% of used memory in top output
[10:33:47] <NodeX> can you pastebin your indexes SergeyUkolov ?
[10:39:01] <topriddy> NodeX: yeah. checking out i see most ppl are of opinion of just storing files at OS level
[10:40:29] <SergeyUkolov> NodeX: Sorry, didn't use this service before :) http://pastebin.com/VepJaxUr
[10:41:58] <SergeyUkolov> btw, it is not a problem of single collection... we have around 300 collections in DB, total size is 220Gb, but it use only 20% of 32Gb RAM and doens't want to use more.
[10:42:34] <SergeyUkolov> sometimes 21%, 20,6%... but never 90%
[10:45:03] <NodeX> SergeyUkolov : I would say that your queries are not using indexes and ergo your data is not in ram
[10:45:25] <NodeX> can you do db.yourCollecction.find({a-typical-query}).explain();
[10:45:28] <fsfsfs> I'm trying to hack libUCI into mongod (POC quality is totally OK for now) to support Unicode collation (that is, 1. correct sorting in non-ASCII, 2. correct case-insensitive sorting)
[10:57:41] <fsfsfs> not having unicode support in 2012 is ... almost insulting to me
[10:58:27] <fsfsfs> I believe I can figure out how to integrate the lib (well, my stuff compiles and all, but it doesn't look like it changed anything so far???)
[10:58:40] <manveru> mongodb is mostly in the US, afaict... so people don't care much
[10:58:46] <fsfsfs> but I don't know where best to store the new DS (not on-disk, but in-memory) and how an interface should look like
[10:59:09] <fsfsfs> MacOSX also is in the US and comes with i18n.
[11:41:41] <remonvv> Ah, no, not really. We run out own aggregation on our data for customer reporting but other than that there's very little intelligence going on ;)
[11:45:08] <remonvv> We created much of our report tooling ourselves.
[11:46:11] <ron> yes, we're starting to look for a general solution
[11:46:19] <ron> I'd rather use a tool than develop from scratch
[11:47:16] <s0urce> Would be really nice if anyone with a clue could check my pastebin, don't wanna annoy you, but don't get it since hours and it's really important, tyvm: http://pastebin.com/yyukDGm9
[11:47:17] <remonvv> Well, our reporting functionality was pretty straightforward so for us having to get up to speed with a tool was actually less time efficient than just builind the aggregations and creating export routes to our CMS and PDF exports.
[11:48:07] <remonvv> s0urce, you're using $elemMatch on an embedded document rather than an array. Your schema isn't correct for your usecase.
[11:49:09] <s0urce> i saved it from json, and it created a document its self, how can i change it to save as array? btw. can an array have assocative keys?
[11:50:30] <SergeyUkolov> what is vsize in mongostat output?
[11:52:32] <remonvv> s0urce, without more information about which language you're using and who or what is responsible for the schema it's hard to help you further.
[11:52:53] <s0urce> i use node.js with the native-driver
[11:52:57] <remonvv> Parts needs to become an array, so parts:[{..,..}, {..,..}] rather than your current schema
[11:53:13] <remonvv> okay, then it's pretty straightforward.
[12:08:13] <remonvv> Either you make it an array and you can filter on elements in MOngoDB or you make it an embedded document and you can filter in your application.
[12:08:29] <remonvv> It's up to you which is best for your application.
[12:08:57] <remonvv> Obviously parts.part1.name is easier than doing an $elemMatch query and then still having to loop through it
[12:09:00] <NodeX> s0urce : you can use dot notation lol
[12:12:39] <s0urce> i need a wildcard dot notation -> parts.*.link :)
[12:25:25] <simenbrekken> Is there an easy way to figure out if I have enough memory to keep the entire data set there without having to read from disk?
[12:25:34] <simenbrekken> Or just a way to give me the current memory usage
[12:30:20] <fsfsfs> back from lunch. Anybody bothered checking out my trying to get collation to work? https://github.com/hacklschorsch/mongo/tree/collation
[12:36:16] <fsfsfs> anybody up for MongoDB Munich tomorrow?
[12:36:56] <NodeX> if you buy me a plane ticket sure why not :)
[12:38:49] <fsfsfs> still. I hope I'll meet some ppl deep into MongoDB to ask my stupid collation questions. If it's more marketing talk, well, the Hilton's food is supposed to be OK
[12:41:38] <NodeX> also check db.stats() and see total size
[13:10:21] <trupheenix> hi. I am using the txmongo driver which doesn't support replication on mongo db. any work arounds for this? isn't replication supposed to be handled by mongo db itself?
[13:24:38] <trupheenix> NodeX, yes. But does it prevent replication? Replication is handled by mongo db itself right?
[13:24:49] <trupheenix> NodeX, it's not a function of the database driver.
[13:25:01] <trupheenix> NodeX, I hope my thinking is right?
[13:25:40] <NodeX> the "w" flag means at least one node must be written to iirc
[13:27:45] <trupheenix> NodeX, For example, to wait for replication to 3 nodes, pass w=3. It means that the insert function should not return until 3 nodes are written to. But will this have effect on a driver which doesn't understand replication but the database itself is configured to support replication?
[13:28:14] <idank> what's the correct way (indexes included) to test a date field if it's null less than a given date? right now I'm using find({'$or' : [{'mtime' : {'$type' : 10}}, {'mtime' : {'$lt' : new Date()}}]})
[14:28:00] <NodeX> [15:21:42] <remonvv> e.g. find({array.name:"Remon"}) or find({array:{$elemMatch:{name:"Remon", awesomeness:10}}}) <--- no documents could be found :P
[16:21:57] <burley_sf> Anyone know what 'W' versus 'w' stands for in db.currentOp locks.* values? (global versus DB-specific per the docs on the lock timing, but I am seeing a DB-specific global lock in the output, which seems odd)
[16:42:12] <NodeX> one thing I do recommend is aggregate lower then lower again
[16:42:33] <NodeX> i/e I turned my history into a daily thing then daily to weekly etc etc
[16:43:15] <NodeX> and I keep[ my collections small and export anything more than 3 days old to json and archive it incase I need to run on it again
[16:43:41] <NodeX> unless you have dedicated aggregation boxes
[16:56:05] <ron> NodeX: when you say aggregate, do you mean using the new aggregation framework in mongodb or doing it manually within the application?
[17:06:34] <Bartzy> Hi, I'm migrating data into MongoDB, and my "Schema" in Mongo uses ObjectId (_id) as a timestamp (so we won't need a timestamp key by itself).
[17:06:59] <Bartzy> First - is that correct to do so? Or is it better to just have a datetime field too.
[17:07:36] <Bartzy> Second, I saw Ruby and Python drivers have a from_time method for creating an ObjectId with a specific timestamp. I didn't see any for PHP - any ideas?
[17:17:15] <Bartzy> NodeX: I'm your favorite #mongodb user I guess :p
[17:23:01] <squawknull> if you have secondary-only replication members, does their oplog size still need to be the same size as the primary, or can they be smaller since they would never replicate out from themselves?
[17:24:09] <fsfsfs> Hmmm, I can do unicode-correct sorting now, but I broke the creation of the index.
[17:33:32] <Ephexeve> Hey guys, question, I am learning MongoDB for my job, but I see no difference between find() findOne() - > I get the same result here
[17:40:20] <sambao21> findone will only ever return 1 result, try your query that you know will return multiple docs
[17:44:34] <Ephexeve> sambao21: yeps true, but that would be the same as find({..}).limit(1)
[17:44:59] <Ephexeve> so in some case, there is no huge difference here I guess, if we are talking about speed, then I don't know
[17:45:19] <squawknull> can a secondary only cluster member have an oplog size of less than the primary? what would be the repercussions of that?
[17:45:34] <sambao21> yeah, but i think with findone, it'll actually throw an error if it finds more than 1, i could be mistaken and thinking of something else
[18:04:00] <ukd1> I read somewhere (and now cant find it) that you can update a shard key -only- if it wouldn't cause it to move shard/chunk. However, reading the code it looks like it
[18:08:22] <Ephexeve> Hey guys, quesiton, getting this error on the web "You are trying to access MongoDB on the native driver port. For http diagnostic access, add 1000 to the port number" Any clue?
[18:13:41] <kali> Ephexeve: have you tried adding 1000 to the port number ? :P
[18:14:42] <kali> Ephexeve: 27017 (i guess this is the port you're trying) is not intended for browser access
[18:14:59] <kali> Ephexeve: 28017 will work better
[18:18:37] <Bartzy> I have a question about indexes
[18:19:23] <Bartzy> I'm wondering if I should use _id in a compound index for time sorting (ObjectId), or to add to my schema (documents still not migrated to mongo) a 32-bit int timestamp and add it to a compound index
[18:20:00] <Bartzy> The question is - does it profoundly matter in big collections (hundreds of millions of documents) - 12 bytes ObjectId in the index vs 4-byte int ?
[18:21:00] <Bartzy> The storage for the data itself is of course bigger with the 4-byte int solution - because we store both _id and the timestamp - but that is pretty negligible. The question is if it's negligible for the index (size, performance) too
[18:29:16] <Bartzy> But am I just micro optimizing here and it's not important ?
[18:29:51] <kali> well, i don't know, it depends how much you have optimized the rest... starting with keynames
[18:30:09] <Bartzy> I read everywhere that using the ObjectId's timestamp instead of a separate one is a nice trick - but anyone is really using that in production ? It's pretty hard to maintain...
[18:30:51] <kali> Bartzy: i'm using that in production on a few bif collections
[18:30:59] <kali> Bartzy: i would not do it for smaller ones
[18:32:47] <kali> Bartzy: it's interesting if you gain an index. in your case, it sounds you're just getting one a tad smaller
[18:41:37] <Bartzy> kali: It's not possible to calculate an index size from the size of the key , right ?
[18:43:35] <kali> Bartzy: not directly... you can evaluate it, but it's quite difficult
[18:46:27] <Bartzy> kali: The opposite - with ObjectId I'm getting one that is bigger than timestamp
[18:46:55] <Bartzy> kali: but there is no need for the timestamp field data (around ~1GB with our amount of documents right now)
[18:57:57] <Ephexeve> I downloaded MongoDB, added to /opt/ extracted, now I am trying to run ERROR: could not read from config file
[18:58:12] <Ephexeve> when I run /mongod --config /etc/mongod.conf this is the error I get..
[19:12:54] <NodeX> if you dont read responses then good luck :)
[19:39:57] <jrdn> anybody get clever with the aggregation framework and used it on top of an already pre-aggregated document? and if so, how are you doing it? :P
[20:40:15] <idank> does mongodb use base64 to store binary data?
[20:41:52] <idank> or is that merely how the mongoshell displays it?
[20:50:31] <wereHamster> idank: of course not. storing binary data as base64 would be completely stupid
[20:53:16] <idank> wereHamster: right ;) so it's just the shell
[21:08:30] <wereHamster> idank: you google 'mongodb repair database'
[21:11:19] <idank> "errmsg" : "Cannot repair database mintigo having size: 32147243008 (bytes) because free disk space is: 14603206656 (bytes)"
[21:11:45] <idank> so to shrink the db I need to have free disk space the size of the db?
[21:24:25] <ribo> can/do replicas use compression to synchronize over slow/expensive links?
[22:29:38] <therealkoopa> I'm struggling to figure out how to fetch a bunch of subdocuments. How could I grab an array of all quux? https://gist.github.com/c966f781e4804fc5b3f7
[22:30:31] <therealkoopa> I'm trying to map reduce, but in the map function, I can't seem to do this.widgets.forEach(function(w) { w.quux.forEach(...)}} to emit
[22:32:23] <bitcycle> Hey all. I'm wondering if someone could recommend a good tutorial on how to define relationships between different documents in mongodb.
[22:39:35] <eka> hi all... how can I see if I'm suffering db lock?
[22:40:07] <eka> the thing is that a web request that writes to mongo takes sometimes 20secs
[22:40:15] <eka> and I discarded all other options