[01:22:39] <fbjork> I get the following error from the ruby mongo driver when I query a 2.0 database: BSON::InvalidDocument: Document too large: This BSON documents is limited to 4194304 bytes.
[02:31:06] <Guest_1448> I have a collection with documents with a "type" field. How would I get max 10 documents for each type using aggregate/group/whatever?
[02:32:54] <Guest_1448> I could for example do .collection.aggregate({ $group: {_id: "$type", count: {$sum: 1}} }) to get a list of types and their counts but I want the actual documents (with max 10 from each type)
[05:00:50] <flyinprogramer> i know this isn't the mongoid group, but, any chance someone knows what i'm doing wrong: https://gist.github.com/4490672
[06:18:15] <synchrone> So I was wondering, what happens if in my .NET application I try to use MongoDBFileStream after IDisposable RequestStartResult object was disposed ?
[06:51:42] <zakovyrya> Hi guys. I was wondering if there any known issues with oplog in 2.2.2?
[07:22:53] <synchrone> hi there fellow-wanderer zakovyrya
[07:24:31] <owen1> I start mongoDB with this command /home/t/bin/mongod --fork --logpath /usr/local/nextgen/push/shared/logs/mongodb.log --logappend --config /etc/mongodb.conf and get: exception in initAndListen std::exception: boost::filesystem::exists: Permission denied: "/data/db/mongod.lock", terminating
[07:24:38] <owen1> btw, I have write permission with the user running it: ls -l /data => drw-rw-r-- 2 root nextgen 4096 Jan 9 07:17 db
[07:25:49] <owen1> could it be related to the bind_ip = 10.8.0.10 in my config? i am not sure what is that actually.
[07:31:59] <owen1> chmod 755 fixed that but now i see: "Wed Jan 9 07:30:16 [initandlisten] ERROR: listen(): bind() failed errno:99 Cannot assign requested address for socket: 10.8.0.10:27017"
[08:11:10] <owen1> i am setting up dev enironment now. 2 hosts.
[08:11:45] <synchrone> in case you are planning different servers to connect to different synchronized mongo instances - you should set up the bind IPs to network interfaces corresponding to the networks they are meant to be accessed from
[08:12:56] <synchrone> unless the app hosts are the same as mongo hosts
[08:13:17] <synchrone> in that case 127.0.0.1 will do for the slave server
[08:13:44] <synchrone> but not the replica source server, because it should be accessed from slave
[08:14:05] <owen1> the app itself lives on each host. so i have mongo+app on each of them.
[08:14:20] <owen1> but the app will connect to the replica. not dirctly to the mongo.
[08:14:26] <synchrone> replica master should be accessed from the slave right
[08:15:28] <owen1> i am not sure i follow you. i know one db will be elected to primary and he other will be secondary, so yeah, primary should be accessed from secondariies.
[08:15:54] <owen1> "you should set up the bind IPs to network interfaces corresponding to the networks they are
[08:16:14] <owen1> meant to be accessed from" - can u explain this please?
[08:31:02] <owen1> it's just copied from the example
[08:31:24] <synchrone> what makes you think this will work then ?
[08:31:42] <owen1> after changing the bind_ip of dev1, i can't run mongo. i get the error above
[08:32:49] <owen1> synchrone: i meant that i just copy pasted into the chat. that's not what i am planning to puth there. i plan to put the ip of dev2.
[08:34:13] <owen1> so how to manage my replica setting if i can't run 'mongo' and use the console?
[08:34:33] <synchrone> change the settings back, cleanup, change back to normal IP, enjoy
[08:35:04] <owen1> so change /etc/mongodb.conf, start mongo,
[08:35:25] <owen1> access the mongo console and try to clean the setting?
[08:35:52] <synchrone> and I've just realized that I misguided you at the point of slave IP setting. it should also be your network ip, because it's master who connects to it in the first place
[09:17:10] <owen1> NodeX: oh. i can't access mongo of dev1. here is my log: Wed Jan 9 09:10:56 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
[09:19:15] <owen1> NodeX: that's how i run it: mongod --fork --logpath /usr/local/nextgen/push/shared/logs/mongodb.log --logappend --config /etc/mongodb.conf
[09:19:20] <Zelest> NodeX, did you see the sexy porn i linked yesterday?
[10:25:29] <synhchrone> (repeating the question in case someone who is able to answer just connected
[10:25:37] <synhchrone> I was wondering, what happens if in my .NET application I try to use MongoDBFileStream after IDisposable RequestStartResult object was disposed ?
[11:40:10] <mighub> Hello, I am using the new version of the Ruby wrapper and now I get this kind of error when I save a doc with a file: Mongo::OperationFailure: Database command 'filemd5' failed: (errmsg: 'need an index on { files_id : 1 , n : 1 }'; ok: '0.0')
[11:40:29] <mighub> Does anybody know what is going on and how to fix this?
[12:38:57] <oskie> I've set ulimits in /etc/security/limits.d/mongodb-nofile.conf, and it works for root, but not mongodb! (at least MMS still complains)
[12:47:32] <mighub`> If somebody is interested, I fixed the problem by using the class MongoClient instead of the deprecated Connection class. I submitted the issue to the bug tracker.
[14:45:03] <aster1sk> Morning all, getting some weird behaviour on a 'proto-duction' box
[14:45:03] <aster1sk> Tue Jan 8 22:45:36 got signal 2 (Interrupt), will terminate after current cmd ends
[14:46:25] <aster1sk> We're running a migration from sql -> mongo ~700 000 000 records and this is the second time this has happened.
[14:46:36] <aster1sk> The logs aren't particularily helpful.
[14:47:48] <kali> aster1sk: have you checked the system and security logs ? you can hit some kind of limit
[14:48:59] <aster1sk> auth.log and dmesg shows nil, colud it be that a mongostat is running constantly?
[15:57:13] <aster1sk> sar shows no memory weirdness.
[17:14:45] <toky> I would like to know if there is a way to empty a mongodb without destroying the actual db...i basically need to empty the data in it but allow it to continue to collect data right after i empty it
[17:26:45] <eka> toky: run a query that deletes old data?
[17:28:48] <toky> eka, and how do i do that? im not a dba...i just ran the application and installed some tools that use it
[17:29:15] <eka> toky: depends on your collections… delete data with a query
[17:29:32] <eka> toky: as in any db… or run mycollection.drop
[17:29:41] <eka> that will delete the entire collection
[17:30:19] <toky> yea that is fine, i just need the /var/lib/mongo dir to drop to as close to 0 as possible
[17:30:34] <toky> all it has is 1 application using it (for now)
[18:08:07] <nonent> i've got a rather unwelcome question. reading the faq i just realized that in a sharded context if i have a doc {_id: a, foo: 1, bar: 2} where the shard key is foo,bar.. and i resave it with {_id: a, foo:2, bar:3} that that could create a situation with _id: a being on 2 different shards. that's unpleasant enough, but what's the failure case if those two rows are balanced to the shame shard? indeterminate? or will one get pr
[18:10:48] <nonent> living and learning. i'm assuming the only way to resolve this is to change my shard key to something where that doesn't happen (just _id would be safe, tho less optimum in terms of inserts) and re-import my data set
[18:11:24] <nonent> but if the failure case of rebalancing is determinate, i could just correct/remove the duplicate docs
[18:19:28] <JoeyJoeJo> What's mongo's equivalent to SQL's OR? For example 'SELECT * FROM table WHERE column = 1 OR column = 2'
[18:31:20] <Diable> How to use FindAll function with C# driver ?
[18:51:27] <bmamone> I've got this service that stores nightclub information in a collection. Each nightclub has a photo and i`m thinking in storing this pictures into the colection (they are small-sized < 128k). You think its a good idea to store it in mongodb, and if so, in the same collection or different one?
[19:08:26] <w3pm> so a related question.. when is it a good idea to create separate collections for things?
[19:08:32] <w3pm> what are the guidelines for dbs vs collections
[19:11:05] <kali> bmamone: it's unlikely you'll manipulate the metadata and the image at the same time, so i would not put them in the same document
[19:13:18] <colinhines> Greetings mongo-ers. I've got a sharding curiousity... If I have an over 256gb replset currently, can I still shard following the mongodb.org instructions if I just change the chunksize to like 1gb?
[22:03:38] <djMax> I'm thinking this is a common pattern but can't find guidance. I have a "transactions" table that I update with +/- transactions using findAndUpdate to make sure that I don't double enter based on a unique id. BUT, I want to cache the balance in a separate collection for a given "buyer"... How does one do this in Mongo?
[22:41:59] <limpc> so i have a number of shards and a config server. I'm using php, and everything seems to work fine except if i try to insert data. I get this error: " can't create user databases on a --configsvr instance"
[22:47:46] <strnadj1> limpc: Iam not sure, but you are connect to config servers? I think you have to connect your application to shard server
[22:48:39] <strnadj1> According to documentation Shard server is routing service for queries from application
[22:54:46] <limpc> im connected to local port 20000 which is: mongod --auth --fork --configsvr --port 20000 --dbpath=/data/mongo/db/config --logpath=/data/mongo/logs/dbconfig --rest --keyFile /mnt/sdb1/www/keys/public.key
[22:55:28] <limpc> the error is specific in that i CANT do what I want to do, from a config server connection. but idk what else im supposed to connect to
[22:58:52] <joe_p> limpc: strnadj1 already answered that - to a mongos