[05:12:05] <Lope> I'm trying to start mongodb as the mongodb user, but after I run this command it's running as root (as seen in htop) DAEMONUSER=mongodb /usr/bin/mongod --fork --port 27017 --dbpath /var/lib/mongodb
[05:12:52] <Lope> It seems like I can't use `su mongodb -c ...`
[05:16:29] <Lope> when I try running it with su, it doesn't even run at all, does not even make a log file.
[06:47:50] <MadWasp> if I wanna do mongodb mapreduce with MongoDB but MongoDB doesn’t offer all the functions i need, would you recommend writing everything in JS or take some MapReduce framework?
[06:48:24] <MadWasp> lol, a lot of mongodb in that sentence :D
[09:03:33] <spydon> How do I search objectId's through casbah? I have tried .findOne(MongoDBObject("_id" -> new ObjectId(id))) but it comes back empty even though the objectId exists
[09:04:12] <spydon> The MongoDBObject looks like this when printed in scala: { "_id" : { "$oid" : "560bee5a42fd695da76330ec"}}
[09:05:01] <spydon> And in the database it looks like: { "_id" : ObjectId("560bee5a42fd695da76330ec"), "id" : 666, "filename" : "test" }
[12:47:00] <BadHorsie> I want to do find operations over the output of rs.status(), how can I do this ? My main interest is recognizing the PRIMARY, was goal is something like rs.status().aggregate({$unwind:"$members"}).find({"stateStr":"PRIMARY"},{name:1})
[12:49:48] <BadHorsie> I'm playig around with puppet and mongo, repl set not doing it for me today :P
[12:50:43] <deathanchor> db.isMaster().ismaster on the machine will return true or false depending if it is primary or not
[13:29:56] <supersym> why on earth would one disallow using comments in a mongo js script? What is the use of that other than pissing off users and frustrating part of the documentation effort (and yes I know, there are yet another 3,4,5 convoluted forms appearantly making up for that by moving it into some dictionaries)
[13:30:26] <m0rpho> hi there! I have a collection where I save millions of links in the form of "http://www.link.com/path_fragment1/path_fragment2/file.html" How can I group all linkss by hostname or hostname+path_fragment1 ?
[13:30:45] <m0rpho> is that even possible with mongodb?
[13:31:40] <supersym> m0rpho: there probably are a -few- ways to pull that off but far from being a seasoned mongo developer, I'd have to check
[13:32:52] <m0rpho> hi supersym, thanks for your response? do you have any keyword for me what to search for? maybe map/reduce? but i'd like to do it in realtime if possible
[13:43:14] <supersym> m0rpho: you mention a lot of records right? As I read, a regex based operation with $group would be very slow though and map reduce probably is your best bet here
[13:43:32] <supersym> http://stackoverflow.com/a/17493547 should contain info on one possible approach
[13:47:24] <m0rpho> supersym: thanks! ill try it :)
[14:27:42] <Gioia> the latest mongodb upgrade broken my heroku server and I’m beating my head against the wall to figure out how to fix it. Something about updating my updating my authSchema..but I’m unable to do so
[14:28:41] <Gioia> when i run the ‘db.getSiblingDB("admin").runCommand({authSchemaUpgrade: 1 });’ command I get an error about not being admin
[20:28:40] <nixfreak> I'm using scrapy with mongodb and scrapy says its writing to the database I specified
[20:29:07] <nixfreak> but when I look at the collections using mongo shell I'm not seeing anything
[20:29:32] <nixfreak> my data is located /opt/data/db and I have multiple files in there
[20:30:04] <nixfreak> file.1 is 64mb so why can't I see these documents in mongo?
[20:33:48] <cheeser> 64mb might just be preallocated space.
[20:34:03] <cheeser> confirm that your db and collection names are correct
[20:34:56] <nixfreak> ok anything else if they are correct ?
[20:35:12] <cheeser> check for errors in logs, etc.
[20:37:26] <StephenLynx> use show databases on the terminal
[20:37:39] <StephenLynx> then use show collections on the databases
[20:51:18] <nixfreak> I'm stumped , mongodb logs just show the connectino
[21:12:45] <stevenk1> question: I am trying to delete an entry. db.mycollection.remove({“_id”:theid}) , but it doesn’t go away. db.mycollection.find({“_id”:theid}) still finds the object. (using mongo —shell)
[21:13:37] <stevenk1> I did receive: writeResult({ "nRemoved" : 1 }), although now if I run it again, I get writeResult({ "nRemoved" : 0 })
[21:22:48] <stevenk1> is there some sort of commit that I’m missing?
[23:09:48] <spellett> sounds right to me. i can't remember does the index on _id enforce uniqueness? if not, is it possible that you had two records with the same _id?
[23:10:24] <spellett> that being said, that wouldn't jive with the response from the second remove as that should also indicate 1 removed
[23:17:08] <blizzow> My replica set secondaries in one of my shards started acting super weird this morning. They have started to fall way behind. I was worried that it was a network/disk issue, but I created a file of random digits (dd if=/dev/urandom of=/var/lib/mongodb/randoms.txt bs=1M count=1024) and rsynced that from my primary to my secondary nodes. rsync -avP user@primary:/var/lib/mongodb/randoms.txt ./ transferred the file over in about 17 seconds. The lag on my
[23:17:21] <blizzow> Anyone have an idea what I should look at?
[23:20:17] <blizzow> Since I now have so much lag (~6000 seconds) I can't change primaries.
[23:21:48] <Boomtime> the only field (currently) that is
[23:30:16] <spellett> @blizzow: how big is your oplog window?
[23:30:38] <blizzow> spellett: I think I'm around 24 hours.
[23:30:49] <blizzow> spellett: I think that's the default.
[23:31:39] <blizzow> I didn't put anything in mongod.conf re: the oplog.
[23:36:49] <blizzow> transfer rates speeds between the two secondaries runs a constant 60-70MB/s.
[23:41:13] <spellett> I think I had read about a similar problem that dealt with the oplog window so my best guess would be to check around the documentation for that. Sorry I can't be more help, good luck.
[23:48:50] <blizzow> Anyone have an idea how I'd clear my oplog? I don't see anything in the documentation about doing so.
[23:51:21] <Boomtime> huh? why would you want to do that?
[23:52:09] <Boomtime> @blizzow: do not clear your oplog, in fact, don't touch it at all, replication assurances rely on it verbatim
[23:55:13] <blizzow> Boomtime: I've got to figure something out. I don't think this replication lag issue is going away. :( I see this... https://jira.mongodb.org/browse/SERVER-18908