[00:12:18] <rcsrcs> OK - new to mongo. Have an instance up. I created an admin user per the docs. Stopped mongo instance, restarted with auth=true. When I connect via command-line mongo.exe with user/pass I don't get an error. But I get unauthorized if I try to do anything (like "show dbs"). This is win8
[00:13:29] <rcsrcs> Any ideas on what I'm missing to get this working?
[00:18:26] <bjori> did you login to the database you created the user on?
[00:18:34] <bjori> and which mongod version is this?
[00:19:30] <rcsrcs> yes - on the same machine, just ran "mongo -u admin -p mongopass --authenticationDatabase admin"
[00:38:32] <synth_> hello, i'm new to mongodb and i'm currently connecting via the pymongo driver. i'm curious if there is an easy way to list collections for a database connection?
[00:45:01] <rcsrcs> FYI - in case it helps someone else (I saw this channel is logged). To create a new read/write user for a database, you can do this: create the database, create the user, then authenticate as that user - with this syntax
[01:35:12] <Fervicus> what's the best way to get a random document from my collection?
[01:52:28] <rdegges_> Hi all, I'm new to mongo, and trying to figure out how to select all distinct city, states from my app. I'd like to do the equivalent of: select distinct city, state from businesses;
[01:52:39] <rdegges_> It looks like the .find() command can't be used with a distinct clause.
[01:52:47] <rdegges_> And the .distinct() clause doesn't seem to do what I need it to do.
[01:52:56] <rdegges_> I need to get documents that have a distinct city AND state pair together.
[01:54:25] <rdegges_> I'd love to do something like: mongo.db.businesses.find({}, {'state_abbreviation': 1, 'city': 1}).distinct({'city': 1, 'state': 1}) or something
[01:59:32] <k_sze[work]> Is it a bad idea to have a mix of document types in a collection?
[02:00:41] <rdegges_> Hey all, in regards to my previous question, I got the following solution working: http://stackoverflow.com/questions/11973725/how-to-efficiently-perform-distinct-with-multiple-keys
[02:00:48] <rdegges_> (Just incase anyone else is interested)
[02:00:56] <rdegges_> It does seem to return a weird result set format though, but oh well!
[02:31:11] <basichash> jkitchen: when I try to run shell, I'm getting "couldn't connect to server 127.0.01 shell/mongo.js:84; exception: connect failed". Is that due to localhost being in use?
[02:39:55] <basichash> I do get this error when trying to start: "Wed Nov 6 02:33:23 [initandlisten] exception in initAndListen: 10296 dbpath (/data/db/) does not exist, terminating"
[02:41:00] <joannac> basichash: So does that path exist?
[06:16:36] <jinmatt> whats the best way to shutdown mongodb? Should I user db.showdownServer() from the console or just shutdown the service from the bash? when I use 'sudo service mongodb stop', then next time when start it again, I cannot access the mongo console due to the mongod.lock
[06:29:34] <Garo_> I'm planning to move a config server in my setup. Is it ok if the hostname is the same but the underlying ip changes? All places (which I could find) use the hostname to specify the server
[07:22:21] <Garo_> kali: thanks, I looked another doc before and it wasn't as clear on the topic
[07:52:50] <jinmatt> whats the best way to shutdown mongodb? Should I user db.showdownServer() from the console or just shutdown the service from the bash? when I use 'sudo service mongodb stop', then next time when start it again, I cannot access the mongo console due to the mongod.lock
[07:53:08] <jinmatt> btw I'm running on a ubuntu 12.04 LTS server
[08:00:09] <NodeX> if you want just three months of data then I suggest you use a capped collection or move the data to another collection and index that
[08:00:19] <jinmatt> NodeX: the lock happens when something is not right, isn't it? if I use db.shutdownServer() and if I run service mongodb start the next time I can successfully login into mongo console with out showing errors about the lock
[08:01:38] <NodeX> a lock occurs when a clean shutdown doens't happen
[08:45:02] <NodeX> singh_abhinav : Mongodb doesn't support ACID or rollbacks or anything like that so it would all really depend on how much you trust your app to not break
[08:59:52] <liquid-silence> the consumption device, is not starting to play the video, its just hanging, If I leave this for a few minutes I am sure it will start playing
[09:01:30] <liquid-silence> NodeX when doing GridStore.read(db, '52794a1100000066f7000005', 'test.mp4', start, chunksize, function(err, data) { } I get [Error: Illegal mode 2]
[09:01:50] <NodeX> I am not sure that's a mongodb problem, once you have the data and can write it, it becomes the web servers problem
[09:02:20] <liquid-silence> I know this, but my implementation of this is wrong
[09:02:33] <liquid-silence> and I am at the point where I don;t know how to fix this anymore
[09:21:49] <liquid-silence> but the player is still stalling
[10:33:01] <robothands> hi all, Mongo noob here. I've read that if your indexes won't fit in memory, then you will experience performance problems as they must be served from disk....makes sense
[10:33:27] <robothands> but adding up my indexes reaches 9.33GB on a server with 8GB RAM, and I see no issues, any hints as to what I'm missing here?
[10:36:13] <kali> robothands: this may also hint that you have useless indexes, to be honest :)
[10:36:45] <kali> robothands: you might want to check that your app is actually using all of them
[10:36:48] <robothands> wouldn't be surprised, we have next to no Mongo knowledge in house :)
[10:39:14] <kali> robothands: you may want to try and play with this: http://eng.wish.com/mongomem-memory-usage-by-collection-in-mongodb/ (i never got it working, but havn't tried very hard)
[10:40:08] <frankblizzard> whats the best way to check if a substring 'q' / query is either in 'name' or 'description' in mongodb?
[10:40:36] <liquid-silence> gridstore, mongodb native, is there a way to pass in the _id and not the name of the file?
[11:37:25] <mariayan> ron: No, we just throw error if there is any ignore fields in the request. Previous mongo db does not response return __t
[12:09:12] <cheeser> mariayan: could you pastebin an example?
[12:50:47] <Walex> we have a semi-typical issue with MongoDB and memory usage and disk traffic, and first let me say that I understand well the memiry mapped file access logic and cache... It is not about that.
[12:52:02] <Walex> the issue is that the 'mongod' process (unfortunately 2.0.6) has an "anon" memory segment that eventually grows form a few GiB to 11-12GiB and then disk traffic becomes very heavy as it crowds out the page cache.
[12:53:15] <Walex> the "anon" memory segment is perhaps likely a 'malloc' arena, but I don't really know. It started growing like crazy after a restart last week, and seems to grow linearly with number of queries received...
[12:53:50] <Walex> Derick: regrettably we are still running Debian 6/Squeeze :-/ and indeed considering doing or using a backport.
[12:54:01] <Derick> Walex: we have our own apt repository
[12:54:08] <Derick> please do not use the distrbution's ones
[12:58:55] <Walex> BTW it would be interesting to know anyhow what that huge anon-mapped segment is being used for, given that MongoDB is supposed to use page cache for the memory mapped database files, indices and journals...
[12:59:18] <Derick> it memory maps files, I think "anon" is also used for that
[13:02:18] <bcave> i was wondering if anyone could help with determining an age from a date in mongo? I've been trying {$sub[new Date(),"user.dateOfBirth"]} and a number of other variations. user.dateofBirth is an ISODate
[13:02:45] <Walex> Derick: nah, it cannot be because 'anon' memory is process own data space, indeed usually 'malloc' arenas.
[13:03:10] <Derick> Walex: then, it could be a memory leak I suppose...
[13:03:44] <Walex> Derick: yes, I was worrying about that, and it is strange that it just "happened". I guess that the best advice remains to upgrade to a later version.
[13:26:24] <amitprakash> Hi, how can I cast Gridout object to a File type object? [python]
[13:27:26] <amitprakash> basically, I am using openpyxl, and it uses zipfile to open the file passed if isinstance(<file>, file) == False ... since zipfile excepts a file path, I can't pass gridout to openpyxl
[13:27:42] <amitprakash> so I was wondering if I could typecast it tp File
[13:56:56] <tomtom_> I am using mongodb with mongoid on my rails app and when I send a lot of requests I get a lot of 500s. It seems it comes from mongodb not handling all the requests but I don't know why and I wish I could have some help
[15:57:23] <platzhirsch> let me rephrase: I want to query a document based on a date field. The query should the return a document with the date nearest to the one specified in the query. If there is a document with the same date, then this one. If not, the one with the smallest time difference on the date field
[15:58:10] <platzhirsch> I think its discussed here: http://cookbook.mongodb.org/patterns/date_range/
[15:59:20] <platzhirsch> NodeX: both, the one that's nearest
[15:59:51] <NodeX> then you need to construct a query that goes either side of the date and do a sort on the date field
[16:00:02] <platzhirsch> you query for 2013-01-15 on documents with (2013-01-01, 2013-01-31, 2013-01-14) then you want to get 2013-01-14
[16:00:26] <platzhirsch> NodeX: makes sense, okay thank you :)
[16:00:47] <NodeX> A........Date.........B <--- sort on "Date"
[16:00:55] <cheeser> it's not *quite* that simple though.
[16:00:56] <NodeX> A&B being the outer bounds of it
[16:01:39] <NodeX> it's a tricky one to get right tbh, personaly I would construct it with a date just in the future and go from 0 - FUTURE_DATE
[16:02:00] <jolene> jerkey's head was spinning. Almost before he had begin to lather up and relax as he let the water sluice down his body, in came setient with another guy, the final member of what was now a gang of seven, who introduced himself as wiretapped. Two guys with heavy swinging dicks coming to stand right next to him in Noisebridge. Two colossally heavy cocks which had very obviously been hard at work; swollen, flushed with their exertions, ...
[16:02:03] <NodeX> but that might bring back a very large cursor - depends on your situation tbh
[16:02:06] <jolene> ... gradually relaxing for a while before they resumed work. Oh fuck. What a crazy place this was. And their conversation! One minute it was all arduino, next moment wiretapped was telling setient that he was about to 'graduate' a couple of students and send them along to him, 'though they both have a little further to go in the depth department. But they're both pretty well adjusted girth wise. How's about we work in parallel; you ...
[16:02:12] <jolene> ... begin shallow with both of them while I carry on deepening them out for you?' They shook hands on it. And then they were back to arduino again. Crazy.
[16:02:15] <jolene> jerkey was about to leave them to it when wiretapped finally took a good look at him. 'Hey bro! That's some dick you have hanging there. And you only thirty-five. Damn. And it looks like you and I might be two of a kind. Though Torpedo here is just the small scale model.' He pointed to where half way down his own floppy hosepipe there was a definite bulge, very fat despite its post erection torpor. 'That's a pretty fierce belly ...
[16:34:49] <zymogens> Does anyone know if it possible to find().populate().find() all in one query?
[16:35:40] <zymogens> i.e. find some based on a condition.. populate one of the fields.... and then do a find on those populated fields... then return the results from the server?
[18:23:42] <sec^nd> Would it be better for me to store 10Mb data chunks in one document or store it in gridfs like manor? I need it to be able to handle many reads and writes concurrently.
[18:30:02] <sec^nd> Would it be better for me to store 10Mb data chunks in one document or store it in gridfs like manor? I need it to be able to handle many reads and writes concurrently.
[19:30:40] <RDove> If MongoDB isn't configured to be secure with user/password authentication, and db.authenticate() is called in Java, what will be the result of the boolean?
[20:56:00] <rdegges_> Hey guys, I've got a quick question about using the aggregate function.
[20:56:27] <rdegges_> I'm using aggregate with $group() as a way to do a distinct() query. Essentially I'm trying to grab two distinct columns from a large collection (300 million documnets).
[20:56:32] <rdegges_> I'm currently doing this with:
[21:16:18] <cheeser> i'm working on the aggregation api for morphia as we speak!
[21:16:20] <rdegges_> How do I apply that in my group clause (a bit new to mongo, sorry for the ignorance).
[22:51:24] <RDove> is this date in a BSON format? .append("date", new Date());
[22:53:21] <tystr> anyone in san diego? going to the meetup tonight?
[23:12:10] <RDove> How do you convert the java date into a ISODate? append("date", new Date()); is what I have right this second -- but it comes out looking like a "string" date instead of something that can be read using TTL
[23:22:31] <smw> anyone have an example of using mapreduce to modify records?
[23:23:15] <smw> I don't really want map reduce. I want to change an old schema