PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Thursday the 5th of March, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[01:06:40] <GothAlice> Ooh, initial benchmarks show a 15% speed improvement (on the average query in one app) and a reduction from 318MiB to 116MiB in terms of data storage for the app by switching to wiredTiger.
[01:19:59] <NoOutlet> Any good sysadmin type folk out there?
[01:23:25] <joannac> NoOutlet: are you hiring? If so, general location might be useful.
[01:24:10] <NoOutlet> I am not hiring. I have done a silly thing.
[01:24:31] <NoOutlet> And I was hoping for some guidance.
[01:25:02] <NoOutlet> However, the search results I'm finding on Google are mainly suggesting ways to avoid silly things in the future.
[01:27:07] <joannac> what's the silly thing you did?
[01:27:13] <Dexx1_> anyone use mongo with cakephp?
[01:28:21] <NoOutlet> `mv fileA fileB` when fileB existed and I did not want to lose it.
[01:29:46] <NoOutlet> The fixes are not ways to get fileB back, but are instead aliases for `mv` which make it so that it doesn't overwrite files.
[01:30:53] <joannac> erm
[01:31:23] <joannac> there's not really a way to get that back
[01:31:56] <NoOutlet> Yeah... :(
[01:32:00] <joannac> backups?
[01:32:22] <NoOutlet> No. It's not that big of a deal. Just a silly inconvenience.
[01:33:06] <joannac> then it's probably more effort than it's worth to recover it
[01:33:11] <joannac> if you even can recover it
[01:33:58] <NoOutlet> Yeah. I agree. I'll just need to transfer it again. I was just hoping there might be something.
[01:34:09] <joannac> dude.
[01:34:23] <joannac> you can transfer it again?
[01:34:27] <joannac> just do it
[01:34:31] <NoOutlet> Yeah, I will.
[01:34:38] <joannac> how big is this file?
[01:35:05] <NoOutlet> A little over a gig.
[01:35:18] <joannac> ...seriously, no
[01:35:28] <joannac> transfer it again
[01:42:31] <NoOutlet> I wasn't freaking out or anything. I knew it wasn't a big deal, but if I could get it back quick without re-transferring and learn a new trick, that would be cool.
[01:42:51] <joannac> no, there's no "undo-mv"
[01:42:59] <joannac> or undo-rm
[01:43:50] <NoOutlet> I was thinking something more along the lines of it being in something along the lines of /tmp
[01:44:00] <NoOutlet> lol
[01:44:16] <NoOutlet> Reused phrase gets reused.
[01:44:27] <crdpink> NoOutlet: for the future: alias mv="mv -i"
[01:44:50] <NoOutlet> Yep, that's one of the fixes I found. Thanks.
[02:32:21] <Dexx1_> Anyone use MongoDB with CakePHP? I am trying to set it up on Mac OS X (10.6.8 SL), would love some hints/tips if anyone has any experience of getting it going
[02:55:14] <Tark> hey guys! I cannot start mongodb 3.0, after setting up packet mongodb-org-server start fails
[02:55:55] <joannac> what's the error?
[02:56:28] <Tark> yes, that is the question! And I don't know answer. mongodb.log is empty
[02:56:43] <joannac> can you start the mongod manually?
[02:56:55] <joannac> mongod --dbpath /home/directory/here
[02:56:58] <Tark> wait a second...
[02:58:26] <Tark> yes, it is starting
[02:58:44] <Dexx1_> joannac, I am trying to do something similar. I got (apparently) a mongoDB plugin for cakePHP but I have no idea how to start it
[02:59:18] <joannac> okay Tark, so the service is failing. what OS? How are you starting the service?
[02:59:38] <joannac> Dexx1_: sorry, i don't knw anything about cakePHP (or much about PHP in general)
[03:00:21] <Tark> joannac, well... I have just update MongoDB 2.6.3, nothing more
[03:00:24] <Dexx1_> joannac, no worries. I have a MongoDB directory though. Is there a standard command I use to start and administer it? Also, is there a GUI/easier way to administer the MongoDB ?
[03:01:00] <Tark> OS: Debian wheezy, if I remember correctly
[03:02:33] <Tark> initscript mongod, action "start" failed.
[03:02:51] <joannac> Dexx1_: the same thing I just told Tark: either mongod --options --moreoptions, or mongod --config myconfig.conf (with options in myconfig.conf), or starting via a service
[03:03:08] <joannac> Tark: you type "initscript mongod"?
[03:03:09] <Dexx1_> k thanks
[03:03:39] <joannac> Tark: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian/#start-mongodb
[03:03:52] <Tark> joannac, nope, this error I've got
[03:04:16] <Dexx1_> joannac, thanks. mongod is not even a recognized command X_x
[03:04:20] <Tark> apt-get install mongodb-org fails because this error
[03:05:08] <Tark> mongod --config /etc/mongod.conf doesn't answer
[03:06:45] <joannac> Tark: pastebin the contents of /etc/mongod.conf
[03:06:55] <joannac> Dexx1_: have you isntalled mongodb?
[03:06:57] <Tark> http://i.imgur.com/F1FAzYG.png -- here is a screenshot Putty, sorry
[03:07:26] <Dexx1_> joannac, in the process. I think the plugin in cakePHP has to be some sort of a wrapper/interface
[03:08:10] <Tark> http://pastebin.com/Pwu9fU57 -- config
[03:09:35] <joannac> how much space in /var/lib/mongodb
[03:10:02] <joannac> what's the output in /var/log/mongodb.log?
[03:11:13] <Tark> mmm... logs is old, from 2.6
[03:11:32] <Tark> 3.0 never started as a service
[03:11:45] <Tark> what about space? How I can check it?
[03:11:54] <joannac> Dexx1_: yeah probably. it's likely to be a wrapper around the office PHP driver.
[03:12:23] <joannac> s/office/official
[03:13:53] <joannac> Tark: could you let me know the output of `ls -la /etc/mongo*`
[03:14:28] <joannac> Tark: also, how you upgraded from 2.6 to 3.0 - what you typed
[03:14:42] <Tark> joannac, there is no such file or directory: /etc/mongo
[03:14:52] <joannac> did you forget the * ?
[03:15:10] <Tark> joannac, aw, I follow this steps: http://docs.mongodb.org/manual/release-notes/3.0-upgrade/
[03:15:22] <Tark> sorry, moment
[03:16:09] <Tark> -rw-r--r-- 1 root root 266 Мар 5 06:06 /etc/mongod.conf
[03:16:18] <joannac> Tark: um, when I ask you "what did you type", I actually want to know what you typed.
[03:16:23] <Tark> holy hell, permissions?
[03:17:17] <Tark> joannac, I've typed: apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
[03:17:20] <Dexx1_> joannac, upon trying to start mongo, I get: dyld: Library not loaded: /usr/lib/libc++.1.dylib (I am on 10.6.8 OS X)
[03:17:36] <Tark> after then echo "deb http://repo.mongodb.org/apt/debian "$(lsb_release -sc)"/mongodb-org/3.0 main" | tee /etc/apt/sources.list.d/mongodb-org-3.0.list
[03:17:53] <Tark> without sudo (because root)
[03:18:02] <Tark> apt-get update
[03:18:09] <Tark> apt-get install -y mongodb-org
[03:18:12] <Tark> that's all
[03:18:54] <Tark> but... I have an old version of mongod.conf, doesn't it matter?
[03:23:05] <Freman> hey
[03:23:26] <Freman> mongodb 2.6.5 libraries should connect to mongodb 3 ok right? minimal of issues?
[03:23:39] <Freman> (just we have a huge env and one or the other will get updated first)
[03:24:18] <Freman> or will mongodb 3.0 libraries conenct to mongodb 2.6.5 fine?
[03:29:35] <joannac> Tark: no you don't you have a new version
[03:29:48] <joannac> Freman: yeah, update drivers first
[03:30:19] <Tark> now I am trying to remove this
[03:43:15] <Tark> holy hell, after apt-get purge mongodb-org* it fails again
[03:48:21] <Tark> hm, now it is ok... WTF
[03:48:26] <Freman> so, very fresh install of mongodb-node - "TypeError: Cannot read property 'done' of null"
[03:48:45] <Tark> joannac, can I use a new storage engine with old config format?
[03:50:05] <Tark> I guess not
[03:55:27] <joannac> Tark: the config file format hasn't changed b/t 2.6 and 3.0
[03:55:31] <Tark> yes! I don't know how, but now MongoDB is working with wiredTiger!
[03:55:40] <joannac> but no, you can't just change the storage engine
[03:55:50] <joannac> it requires a mongodump / mongorestore
[03:55:54] <Tark> joannac, I've removed old db files
[03:56:00] <Tark> yes, I know :)
[03:56:05] <joannac> oh, then yes
[03:56:08] <Tark> hell, it works!!1
[03:56:17] <Tark> joannac, thanks you very much!
[03:56:24] <joannac> except you have no data... but okay
[03:56:26] <joannac> yw :)
[03:56:35] <Tark> mongorestore will fix it :)
[03:56:47] <Tark> good luck!
[04:47:13] <Dexx1_> is there a easy 'gui' browser for mongoDB on linux?
[04:48:03] <thik> http://robomongo.org
[05:35:01] <dcuadrado> if I have mongodb 2.6.8, is it ok to add new replicas using mongodb 3.0+wiredtiger and then kill the 2.6 instances?
[05:35:51] <dcuadrado> GothAlice: hello, can you help me ^ ?
[05:39:08] <joannac> dcuadrado: sure
[05:40:35] <joannac> although I hope you have a good reason for moving, have tested, etc
[05:46:45] <dcuadrado> joannac: we are moving some bigger instances and I was thinking about taking the opportunity to upgrade now
[05:47:06] <dcuadrado> I mean, it is gonna be the default engine soon right?
[05:51:15] <joannac> dcuadrado: neither of those is a compelling reason to move to WT
[05:51:27] <joannac> especially without testing
[05:51:54] <dcuadrado> yeah agree
[05:57:08] <dcuadrado> the mongorestore process seems stuck
[05:57:30] <dcuadrado> is there a known bug?
[05:58:11] <joannac> a known bug for what?
[05:58:29] <joannac> you haven't actually given any details of the problem
[05:59:20] <dcuadrado> yeah sorry I'm very sleepy atm, I'll deal with this tomorrow
[05:59:25] <dcuadrado> thank you joannac
[05:59:53] <joannac> friends don't let friends near the production database when sleep deprived
[06:00:02] <joannac> :)
[06:00:28] <dcuadrado> no, it's not the prod db, just a test in my local db
[06:15:19] <Dexx1_> hey guys. New to monogo, I am reading this: http://docs.mongodb.org/manual/core/crud-introduction/ --- is that good enough for a noob? I got thrown into a project that's already running mongo and I want to know the best course of action as far as getting familiar with mongo
[06:17:08] <joannac> Do one of the online MongoDB courses
[06:22:18] <Dexx1_> joannac: any one in particular??
[06:22:28] <Dexx1_> (only meant to use one question mark ? )
[06:23:01] <joannac> depends, are you coding or maintaining?
[06:23:22] <joannac> are you a dev or a DBA?
[06:28:10] <joannac> oh, one of these https://university.mongodb.com/
[06:28:20] <joannac> in case that's what you meant
[06:29:16] <divyun> hello.. if I use an object( {asd: 'asd' , sdf: ['qwe', 'qwe']} ) as an _id .. how much of a performance issue would that be?
[06:29:33] <joannac> your index will be larger
[06:29:38] <joannac> what's the usecase?
[06:31:02] <divyun> I wanna keep track of conversations on the basis of who started that convo and when was it started along with some tags
[06:32:38] <PiPi> hi, how does large embeded array impact to performace, any impove in mongo 3.0
[06:33:24] <joannac> dcuadrado: that doesn't explain why it has to be the _id
[06:33:34] <joannac> oops, divyun ^^
[06:33:59] <joannac> PiPi: http://askasya.com/post/largeembeddedarrays
[06:36:08] <divyun> It doesn't have to be... just wondering why not? and those combined would be used to identify an conversation.
[06:37:05] <joannac> well, I just don't see the point
[06:37:14] <joannac> it makes your queries a tiny bit more complicated
[06:39:33] <divyun> I'll have that object available .. so if that's the id.. I'll query it right away. Otherwise, they'll have to passed as parameters.
[06:40:14] <joannac> are you using a driver?
[06:40:27] <joannac> does it preserve order and type?
[06:41:31] <divyun> Its hypothetical atm.. I'll be working with meteor.
[06:44:53] <divyun> I'll have to confirm if meteor's 'observe' driver takes care of the order and type.
[06:45:07] <joannac> divyun: so if you ahve a document like {_id: {a:1, b:1}}
[06:45:31] <joannac> and you do a search like db.foo.find({_id: {b:1, a:1}})
[06:45:35] <joannac> that does NOT match
[06:46:10] <PiPi> so which array is 'large', more than x elements or larger x bytes?
[06:47:31] <divyun> @jonnac oh! do I need to convert it to a string?
[06:47:40] <joannac> divyun: ...what?
[06:47:58] <joannac> how does that follow from what I said?
[06:51:19] <divyun> if I convert that object into a string to store it as _id .. query similarly .. it should work .. ??
[06:53:46] <divyun> oh.. my bad.. I misunderstood it.
[06:54:30] <divyun> order of the object you were talking about... I think I can preserve that during generating queries.
[06:56:53] <divyun> @jonnac ..btw, I tried this at http://try.mongodb.org .. > db.asd.save({_id: {asd: 'asd', qwe: 'qwe'}}); > db.asd.find({_id: {asd: 'asd', qwe: 'qwe'}}); >db.asd.find({_id: {qwe: 'qwe', asd: 'asd'}}); ... seems to work
[06:57:25] <divyun> order doesn't seem to be issue
[06:57:40] <divyun> an*
[07:05:42] <divyun> @jonnac thank you for your help... I'll bid my farewell now.
[07:16:06] <joannac> for the record, that works because try.mongodb.org is not a real mongo shell
[07:23:36] <Gottox> hi! I'm getting an error when I try to compile mongodb with system v8: KeyError: 'LIBDEPS_v8_SYSLIBDEP':
[07:23:53] <Gottox> is this a known bug?
[07:24:27] <Gottox> see full configure output here: https://gist.github.com/9ac7cf4f2787ad311d2e
[08:20:16] <QGuLL_> hi, i'm confused with mongodb built-in roles specified on http://docs.mongodb.org/manual/reference/built-in-roles/ : did they changed ? i'm on mongodb-10gen 2.4.6 and doesn't observe right what it is said in the doc
[08:22:17] <QGuLL_> that page is valid for 3.0+ ?
[08:26:16] <QGuLL_> it seem's to
[08:50:55] <QGuLL_> "You can authenticate as only one user for a given database. If you authenticate to a database as one user and later authenticate on the same database as a different user, the second authentication invalidates the first. "
[08:51:37] <QGuLL_> does that mean that my superAdmin user would never can auth into any db, but only admin db ? (and after do a use SomeDb)
[10:03:54] <QGuLL_> can't we update user's role on mongo 2.4 ? i don't find the updateUser documentation on mongodb website for version 2.4, but for 3.0 i do
[10:13:58] <kexmex> hi what's the alternative to fsyncLock with WiredTiger?
[10:20:26] <boolman> I'm trying to create a 3 node cluster with all new installations. 1st node, rs.initilize() ; rs.add("node02:27017"), but the node02 is stuck in STARTUP and the 1st node is in SECONDARY
[10:20:30] <boolman> what to do+
[10:40:59] <kexmex> whats the diff between Date and ISODate?
[10:41:06] <kexmex> is Date just as precise as DateTime?
[12:21:30] <esko> Hi!, can someone tell me how to get just the matching title/url in my result?, or is my thinking wrong.
[12:21:40] <esko> http://pastebin.com/RFpmmru0
[12:23:05] <kali> esko: you need $elemMatch, look there : http://docs.mongodb.org/manual/reference/operator/projection/elemMatch/
[12:56:59] <esko> kali: almost there, it also returns every non-match as {} ?
[12:57:11] <esko> eg: db.balls.find({"links": {"$elemMatch": { "title": "more"} } },{links:1,_id:0})
[12:57:49] <esko> ehr: db.balls.find({},{_id:0,'links': { $elemMatch: {title: 'more'}}})
[12:57:51] <esko> :)
[12:57:57] <esko> how come?
[12:58:04] <kali> esko: keep the selector on the left too
[12:58:23] <kali> i mean on the first argument on the find
[12:58:46] <kali> esko: the first argument of the find filters documents, the second filters stuff inside matched documents
[12:59:45] <esko> ic, thanks
[13:05:57] <boolman> if I have a hidden replica on server x, and removed it as member and used it as a standalone to do some lab-testing. What happens when I readd it ?
[13:06:24] <boolman> does my changes get overwritten? ( i created indexes )
[13:06:31] <boolman> or do I need to clear the datadir?
[13:26:02] <esko> kali: but what if i wanted to search through all documents in the collection?
[13:27:57] <esko> perhaps im better suited to have a own collection for this rather than have it in an array
[14:15:01] <fhain> boolman: try it out yourself
[14:15:33] <boolman> fhain: yes I did =)
[14:20:02] <skot> fhain: how did you remove it and add it back? Through a reconfig, or just by stopping the process and starting on a different port?
[14:20:49] <skot> It will make a difference with what happens to the data changes while it wasn't actively in the replica set.
[14:44:59] <zotherstupidguy> hello
[14:45:17] <zotherstupidguy> i am using mongoid, and i find it difficult to create an index for usernames
[14:45:24] <zotherstupidguy> for my User model
[14:45:33] <zotherstupidguy> any idea what i could be missing?
[14:46:06] <zotherstupidguy> index({ username: 1 }, { unique: true })
[14:46:30] <zotherstupidguy> still i can add duplicates to the document! which isnot what i want, as i aim for unique!!!!
[15:08:53] <Cygn> Is there a way to tell the count function in a $group (aggregation) to return 0 if there is no value instead of just ignoring the specific group in the result?
[15:12:36] <thewanderer1> Hi. How do I reliably open a file for writing in GridFS, but only if it did not exist before? I'm using the Node.js driver (1.4).
[15:13:16] <thewanderer1> There is the GridStore.exist(), but this seems prone to race conditions between the check and the write.
[15:41:20] <spuz> why would you ever want to use findAndModify()?
[15:45:58] <Acidnerd> hello..trying to get mongodb to install in debian jessy
[15:46:22] <Acidnerd> but can't bypass the apt-get install mongodb-org-server
[15:46:38] <Acidnerd> dpkg: dependency problems prevent configuration of mongodb-org:
[15:46:42] <Acidnerd> mongodb-org depends on mongodb-org-server; however:
[15:46:44] <Acidnerd> Package mongodb-org-server is not configured yet.
[15:46:46] <Acidnerd> dpkg: error processing package mongodb-org (--configure):
[15:46:48] <Acidnerd> dependency problems - leaving unconfigured
[15:46:50] <Acidnerd> Errors were encountered while processing:
[15:46:52] <Acidnerd> mongodb-org-server
[15:46:54] <Acidnerd> mongodb-org
[15:46:58] <Acidnerd> can anyone point me in the good direction ?
[15:50:08] <Acidnerd> mongodb-org depends on mongodb-org-server; however:
[15:50:09] <Acidnerd> Package mongodb-org-server is not configured yet.
[15:50:33] <Acidnerd> how can i configure mongoddb-org-server PRIOR to install it ? does not make any sense this error message
[15:51:00] <Acidnerd> is there a command i can execute to configure it ? the finish the install ?
[15:53:36] <boolman> Acidnerd: tried installing from mongodb.com ?
[15:54:36] <boolman> installation process for me on ubuntu 12.04 was step 1 wget, step 2 tar xfv file, step 3 copy contents of the bin-dir to /usr/bin/, step 4 /usr/bin/mongod &
[15:55:03] <Acidnerd> boolman, no, from repository
[15:55:20] <Acidnerd> http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian/#install-mongodb
[15:55:27] <Acidnerd> but instead of jessy i used wheezy
[15:55:34] <Acidnerd> no jessy yet i guess
[15:56:19] <Acidnerd> i installed using apt-get install -y mongodb-org boolman
[15:56:36] <boolman> try aptitude perhaps, its way more intelligent
[15:57:32] <Acidnerd> just tryed now
[15:57:39] <Acidnerd> getting basically the same error :
[15:57:40] <Acidnerd> invoke-rc.d: initscript mongod, action "start" failed.
[15:57:40] <Acidnerd> dpkg: error processing package mongodb-org-server (--configure):
[15:57:40] <Acidnerd> subprocess installed post-installation script returned error exit status 1
[15:57:40] <Acidnerd> dpkg: dependency problems prevent configuration of mongodb-org:
[15:57:42] <Acidnerd> mongodb-org depends on mongodb-org-server; however:
[15:57:43] <Acidnerd> Package mongodb-org-server is not configured yet.
[15:57:59] <Acidnerd> it seems unable to instantiate the script to configure the server
[15:58:09] <Acidnerd> then leave the install unfinished
[15:58:35] <boolman> try to fix the dependencie-problem with: apt-get -f install
[15:59:03] <boolman> https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-debian71-3.0.0.tgzCOPY LINK
[15:59:20] <Acidnerd> exact same error even with -f install
[15:59:20] <boolman> just downlado the binarys and move them to /usr/bin :P
[15:59:22] <boolman> easier
[15:59:41] <Acidnerd> all right...trying that way then
[16:01:36] <Acidnerd> boolman, can you explain a bit where to put it ?
[16:01:37] <Acidnerd> http://docs.mongodb.org/manual/tutorial/install-mongodb-on-linux/
[16:02:27] <Acidnerd> shall i do #mv bin/ /usr/bin/mongodb ?
[16:02:38] <boolman> mv bin/ /usr/bin/
[16:02:45] <boolman> mv bin/* /usr/bin/
[16:03:26] <Acidnerd> done
[16:03:27] <boolman> this is how I install mongodb on my vagrant servers
[16:03:28] <boolman> node.vm.provision :shell, inline: "cp /vagrant/mongodb-linux-x86_64-ubuntu1204-3.0.0/bin/* /usr/bin/ && mkdir -p /data/db && /usr/bin/mongod --syslog --replSet 'rs0' &"
[16:05:40] <Acidnerd> hmm
[16:05:53] <Acidnerd> Insufficient free space for journal files
[16:05:58] <Acidnerd> how can i fix this ?
[16:06:17] <Acidnerd> boolman, this is what i get when mongod from terminal
[16:06:47] <Acidnerd> are journal files needed ? i want to log, nothing of this sort, can journalisation be disabled ?
[16:07:20] <Acidnerd> also now that install was done manually, where are my mongod.conf ? same place as install from repo ?
[16:07:52] <Acidnerd> how do i make sure it loads at startup ?
[16:09:12] <boolman> no, i dont think it comes wit ha mongodb.conf or a init script
[16:09:44] <Acidnerd> well so i guess this is not the way i should go
[16:09:51] <Acidnerd> make all the process more complicated it seems
[16:10:14] <Acidnerd> my system seems to be messy, with remains of the repo install
[16:10:18] <Acidnerd> and now the manual install
[16:10:47] <Acidnerd> still have /etc/mongod.conf there and /etc/mongodb.conf
[16:11:14] <Acidnerd> how do I know what conf file the manual install is using ?
[16:13:13] <pamp> someone uses mongo on windows server 2008?
[16:18:49] <Acidnerd> ok thanks for the help, i'm back to mysql for that tool, this is just not working after trying 3 different methods
[16:31:48] <milind> Hi, I have a n00b question here. When i run mongodump with --oplog , I see following under the output directory - http://pastie.org/10002497
[16:32:40] <milind> As you see, there is a zero byte oplog.bson at root of the directory as well as one under dump directory -- why do i have two of them?
[18:06:01] <anumpatel> hey!
[18:08:21] <anumpatel> Is there any alternative of creating a model except " mongoose.model(modelName, schema) " ?
[18:14:48] <girb> I have a 1 replicaset live running on prod and have setup other 3 replica sets .. can I join them live and make shard ?
[18:15:24] <girb> any suggestion would be helpfull .. data size is 700GB
[18:30:51] <flyingkiwi> girb, sorry. you cant. you have to shutdown
[18:30:58] <flyingkiwi> the *whole* cluster
[18:31:48] <GothAlice> girb: http://docs.mongodb.org/manual/tutorial/convert-replica-set-to-replicated-shard-cluster/
[18:32:05] <girb> flyingkiwi: so I need to shutdown the cluster until the whole data distribution takes place ?
[18:32:16] <girb> sorry I'm new to mongodb
[18:32:26] <GothAlice> girb: You've already done step one, create a replica set. You want to continue from "add initial replica set as a shard".
[18:33:10] <GothAlice> During promotion to a sharded replica set, your data won't initially be sharded. You must then enable sharding on the collections you want to spread amongst the clusters (by adding a sharding key).
[18:33:53] <GothAlice> E.g. sh.enableSharding("mydatabase"); db.test_collection.createIndex( { number : 1 } ); sh.shardCollection( "test.test_collection", { "number" : 1 } )
[18:34:18] <girb> GothAlice: yes that I know .. so my collections are larger of arround 600GB .. so do I need to wait untill all the collections are distributed ?
[18:35:02] <GothAlice> No, though until a shard key is set and balancing finishes up you won't gain any real benefit from the shards.
[18:35:14] <GothAlice> (But at no point should it lose track of your data; queries should still work A-OK during balancing.)
[18:35:53] <girb> GothAlice: ok .."should still work A-OK during balancing" << this was what I needed
[18:36:17] <girb> GothAlice: is always there to help .. thanks a bunch :)
[18:36:35] <GothAlice> girb: http://docs.mongodb.org/manual/reference/method/db.printShardingStatus/#db.printShardingStatus will be your friend (and db.stats()) while everything is processing.
[18:37:00] <GothAlice> See: http://docs.mongodb.org/manual/tutorial/convert-replica-set-to-replicated-shard-cluster/#confirm-the-shard-is-balancing
[18:37:31] <girb> GothAlice: so its safe to turn on the apps using DB while balancing
[18:38:17] <GothAlice> Performance may be degraded (similar to background indexing) while things are being bulk moved around, but otherwise yes, this type of thing should be quite safe.
[18:39:31] <girb> ok
[18:43:45] <GothAlice> girb: http://docs.mongodb.org/manual/tutorial/manage-sharded-cluster-balancer/ may be of interest.
[18:44:01] <GothAlice> Covers scheduling balancing so as to not have performance degradation during critical times. :)
[18:45:01] <girb> girb: ^^ good one :)
[19:28:14] <Dexx1_> need help starting mongodb guys. I am getting ERROR: listen(): bind() failed errno:98 Address already in use for socket: 0.0.0.0:27017
[19:29:04] <GothAlice> Dexx1_: ps aux | grep mongod
[19:29:55] <Dexx1_> GothAlice, ok worked duh
[19:30:08] <Dexx1_> GothAlice, how do I find out database access information?
[19:30:10] <GothAlice> Dexx1_: That error indicates that some other process has requested exclusive access for listening on that port (the default MongoDB port). The PS line there will let you know if it's another copy of mongod running.
[19:32:11] <GothAlice> Dexx1_: Just type "mongo" (no d on the end) and press enter to connect, by default. (If you've enabled authentication you'll need to authenticate either on the command line or after connecting.)
[19:38:36] <Dexx1_> GothAlice, the issue i have is that I have already ssh'ed into a VM and I since I need two shells open for mongo, it won't let me ssh in again
[19:41:51] <GothAlice> Dexx1_: Well, then the "connection information" you're looking for is basically just the address of that VM. Since it's bound to 0.0.0.0 (all interfaces) MongoDB within the VM will be accessible from outside the VM without issue.
[19:42:34] <GothAlice> Also, if you're hosting a VM locally for the singular purpose of a development environment, the VM is likely a rather large waste of your system's resources. ;)
[19:44:43] <GothAlice> Dexx1_: As a note, one doesn't need any "shells open" to host MongoDB. It's a network service, not a serial terminal.
[19:59:46] <GothAlice> Argh! My beautiful 1000+ day VM uptimes, ruined by a Rackspace dom0 reboot. T_T Watching the cluster re-mesh and elect was kinda pretty, though.
[20:00:05] <Zelest> I got a machine on 996 days uptime..
[20:00:17] <Zelest> Today we got a mail "hey, we want to move this old VM to our new platform"
[20:00:20] <Zelest> noooope!
[20:01:02] <GothAlice> 1084 days on my former primary. ^_^ And yeah, we've got a VM on the old infrastructure they're wanting to bump. Luckily Rackspace have a seamless transition process (i.e. after is identical to before, just running on a newer dom0).
[20:01:11] <Zelest> :S
[20:04:47] <GothAlice> Also, for as much love as I give MMS, I'm terrible for finding obscure bugs, edge cases, and downright silliness in systems. My test MMS cluster is "up", but MMS reports every node as in-progress applying changes. What changes? No changes, apparently, if I cancel and attempt to review, the list is empty. T_T
[20:05:27] <GothAlice> Wryyyyyyy...
[20:09:48] <GothAlice> Zelest: One hour of downtime in 1084 days = 0.9999% uptime (four nines) over nearly 3 years, or, around a 297% single-year uptime. XD
[20:11:31] <Zelest> Damn, nice!
[20:11:41] <Zelest> Though, did it have full connectivity during that time as well? ;)
[20:11:45] <Dexx1_> GothAlice, so here's the issue I am having. (I want to connect mongoDB with cakePHP) I am running a VM through my os x terminal and I can run mongod, but once it's running how do I interact and do other stuff? It just idles and waits
[20:12:19] <GothAlice> Dexx1_: Well, that tells me you're running mongod in the foreground rather than as a system service in the VM. Simply starting the VM should start MongoDB, and no further interaction is needed at all.
[20:12:33] <GothAlice> Dexx1_: In your app, just connect the MongoDB driver to the IP address of the VM.
[20:13:06] <GothAlice> However, developing on Mac OS X, I just install the homebrew mongodb (I need SSL) and run it as a launchd system service, without a VM. The VM is overhead that isn't needed.
[20:14:32] <GothAlice> Similarly, any command-line tools you want to use (mongo, mongodump, etc.) can be run outside the VM. Just point them at the -h <ip of vm> and they should work. (Or get rid of the VM, it's not helping you in any way, and connect to your app to localhost.)
[20:15:48] <GothAlice> Zelest: Indeed yes. Worst-case in the life of that primary were some slow (and I mean _slow_) requests. No outright failures.
[20:16:26] <GothAlice> (It has a load average of 0.15, so it's not often stressed.)
[20:17:12] <Zelest> Nice :)
[20:20:32] <GothAlice> Dexx1_: The "mongod" process is a network service; it has no terminal UI. Your description of "idles and waits" is exactly what it does; it's waiting for a connection from a MongoDB client like your application. (It also has a --fork option which tells it to run in the background instead of foreground.) However you really should use the platform (Linux init.d, Mac launchd, etc.) system for keeping services running.
[20:48:22] <hahuang61> sooooooo what's the difference between WiredTiger vs. MMAPv1?
[21:13:00] <GothAlice> hahuang61: WT and MMAPv1 are completely different back-end implementations, with very little in common.
[21:13:34] <hahuang61> Yup, but what are the implications on the front-end or why would you use 1 vs the other?
[21:17:31] <GothAlice> hahuang61: Minor implications on the front-end in terms of differing output for certain commands, e.g. db.stats().
[21:17:54] <GothAlice> My application (excluding a bump in version for PyMongo) was blissfully unaware that I upgraded it from 2.6 to 3.0 and changed engines.
[21:23:24] <hahuang61> hmm so why upgrade?
[21:23:28] <hahuang61> performance implications?
[21:27:41] <GothAlice> hahuang61: Switching to WT reduced data storage to one third the original, and increased average query performance 15%. But that's for one application. As with any comparative measure, measure using your own data for real results.
[21:28:01] <hahuang61> GothAlice: thanks :)
[21:28:45] <fewknow> good thing they bought WT
[21:29:06] <GothAlice> fewknow: I've seen in the last week operations that take 9000% longer.
[21:29:17] <fewknow> GothAlice: really?
[21:29:19] <GothAlice> Yeah.
[21:29:21] <fewknow> with WT?
[21:29:24] <GothAlice> Yup.
[21:29:28] <fewknow> that sucks
[21:29:31] <fewknow> what are the operations?
[21:29:33] <GothAlice> As always, testing with your actual data and actual queries is important.
[21:29:41] <fewknow> yeah..i agree
[21:29:44] <GothAlice> fewknow: (Extremely high skip counts.)
[21:30:47] <fewknow> GothAlice: what are you skipping for?
[21:30:51] <fewknow> and why a high count?
[21:30:56] <fewknow> just curious
[21:31:10] <GothAlice> fewknow: Wasn't me, it t'was a prior support incident I helped resolve. (Retrying with _id $gt offsets was the preferred solution.)
[21:32:08] <fewknow> right...i don't use skip ever...or haven't seen a use for it yet.
[21:34:14] <GothAlice> Heh, skip is the reason when I click "show more" at the bottom of my YouTube subscription stream, and someone has posted something new, I get duplicates of previously seen entries. _Bad design, Google!_
[21:34:28] <fewknow> lol
[21:35:24] <GothAlice> (Twitter does the right thing, OTOH. They have a "X new" prepended to the top, and the infinite scroller retries rather than skipping.
[21:35:30] <GothAlice> )
[21:36:06] <fewknow> just lazy
[21:41:44] <FiftyFivePlus> How difficult is mongodb to admin for a sys admin noob? (why are hosted/cloud solutions so expensive?)
[21:51:30] <GothAlice> FiftyFivePlus: Cloud, for the most part, is a fancy business-to-business (B2B) marketing term to help extract money from gullible companies.
[21:51:55] <morenoh149> FiftyFivePlus: the answer is yes
[21:52:05] <GothAlice> Also ye.s
[21:53:00] <GothAlice> FiftyFivePlus: If you can download a compressed file, extract it, and run the contents, you can run a MongoDB cluster using MMS.
[21:53:09] <FiftyFivePlus> yes as in "yes it's difficult for a noob to admin" ?
[21:53:23] <GothAlice> FiftyFivePlus: No, "yes" as in you were asking the wrong question. ;)
[21:53:56] <FiftyFivePlus> i'm already confused ;)
[21:54:09] <GothAlice> FiftyFivePlus: Someone with zero prior sysadmin experience can "admin" a MongoDB cluster.
[21:54:17] <fewknow> FiftyFivePlus: mongodb admin is simple
[21:54:19] <GothAlice> They won't do it better than someone with experience, however.
[21:54:59] <fewknow> FiftyFivePlus: it is harder to understand the concept of replicaSets, Sharding, mongos, sharkey, etc
[21:55:07] <fewknow> once you know them admin is really easy
[21:55:28] <FiftyFivePlus> excellent, so where do i start becoming a 55++ mongodb admin ;?)
[21:55:30] <fewknow> but most of the time you end up building automation for the admin anyway...
[21:55:44] <fewknow> FiftyFivePlus: there are online courses offered for free
[21:55:51] <GothAlice> Thus for noobs the recommendation of MMS.
[21:55:54] <GothAlice> (https://mms.mongodb.com/
[21:56:08] <fewknow> yep..MMS is one click deploy now ... I think
[21:56:28] <fewknow> FiftyFivePlus: are you learning for fun...or for job?
[21:56:29] <GothAlice> fewknow: Well, download and run something, but yeah.
[21:56:40] <GothAlice> One-click click on AWS only.
[21:56:47] <GothAlice> After the many clicks to configure security credentials.
[21:57:00] <fewknow> who does security anymore?
[21:57:07] <fewknow> i firewall that shit
[21:57:10] <fewknow> lol
[21:57:11] <GothAlice> lol
[21:57:12] <GothAlice> firewalls
[21:57:40] <GothAlice> I run a darknet for my server-to-server database access. (I.e. a private VLAN.)
[21:57:52] <fewknow> nice
[21:58:04] <GothAlice> So, uh, good luck getting in… from a non-tagged physical port. ;)
[21:58:31] <FiftyFivePlus> fewknow: i dabbled with couchdb but it's for my startup
[21:58:32] <fewknow> the easiest way to hack a database is from the application code anyway
[21:59:12] <fewknow> FiftyFivePlus: where are you located? Have you looked at meetups in the area?
[21:59:42] <FiftyFivePlus> niagara falls, canada - not much here
[21:59:50] <fewknow> nice
[22:00:17] <fewknow> best way is to just install locally and start playing around
[22:00:31] <fewknow> I would start with inti scripts and automating spinning up a replica set locally
[22:00:46] <fewknow> you know python or java-script?
[22:00:49] <fewknow> or you a bash guy?
[22:01:01] <GothAlice> fewknow: Well, for giggles I set up a simple firewalled mongod on a VM, then did some Python packet injection magic to convince it to become a replica set by faking the packets as being from a trusted source (authorized app server) on an already-established TCP connection (no syn/ack connection handshake to worry about not getting ;) Now I make sure to enable authentication, even if I think remote access is impossible. XP
[22:01:25] <fewknow> nice
[22:01:38] <GothAlice> Also SSL with pre-exchanged certs. ¬_¬
[22:01:55] <fewknow> FiftyFivePlus: one thing mongodb does really wewll is the documentation....well atleast better than other databases
[22:01:56] <fewknow> http://docs.mongodb.org/manual/
[22:02:31] <GothAlice> There are a few sections that lean a bit towards the ambiguous. For example, don't expect the mongo shell to speak the MongoDB-enhanced JSON dialect.
[22:02:55] <GothAlice> (It does… unless you need to preserve type information…)
[22:04:24] <FiftyFivePlus> so this MMS is a set of tools for mongodb in the cloud admin ?
[22:04:44] <fewknow> yep
[22:05:03] <fewknow> monitoring, deployment, etc
[22:05:11] <fewknow> I only use it for monitoring
[22:05:26] <fewknow> and only because it is free for me
[22:06:00] <FiftyFivePlus> while 8 servers seems a lot, does it not get pricey if used on top of commodity VPS like digitalocean or is DO my first wrong move ?
[22:14:01] <GothAlice> DO is pretty much the wrong move.
[22:14:37] <GothAlice> (I've attempted to use them in the past, intermittent Gentoo support, and have about a dozen _public_ support tickets with large vote counts open for three or more years…)
[22:15:56] <FiftyFivePlus> is Linode better?
[22:16:11] <GothAlice> Very much so, yes.
[22:16:17] <FiftyFivePlus> thanks
[22:17:02] <GothAlice> The minimum Rackspace setup for a non-high-availability cluster w/ < 1GB of data is ~$100/mo.
[22:17:33] <GothAlice> (That's two 1GB "general purpose" nodes.)
[22:18:12] <GothAlice> Something more bare-metal and less managed would improve on that level of efficiency. ;)
[22:22:18] <FiftyFivePlus> now, how difficult is mongodb to manage *without* MMS ? and if it's still simple to admin then why is MMS so expensive beyond 8 servers or is it really more full server than VPS oriented?
[22:22:37] <GothAlice> FiftyFivePlus: How much data do you have?
[22:22:52] <GothAlice> Or what is your expected growth? (Depends on where you are in development. ;)
[22:25:49] <GothAlice> FiftyFivePlus: As a note, running a database service at all is more of a full server thing, to do properly. You want low latencies and the highest possible data streaming rates for disk, RAM, and network, and any form of abstraction _will_ get in the way. The amount of in-the-way-ness that is acceptable will vary from project to project.
[22:26:09] <FiftyFivePlus> no idea - if whatever i am doing gets traction then it could be single digit petabytes ... so, i am trying to figure out what my revenue model can afford in case i succeed ......... you know the problems with these things - in order to succeed we could always turn up the richness of the service - if hosting was free ;)
[22:26:38] <GothAlice> Well, if you're potentially storing petabytes make sure your revenue rates cover the infrastructure requirements.
[22:26:40] <Dexx1_> Whats the simplest way to start a mongodb database with a specific username/password on localhost?
[22:26:44] <GothAlice> Hard to scale a free service that large. ;)
[22:27:18] <GothAlice> Dexx1_: "With a specific username/password" — please clarify what you mean by this. Username/password required for MongoDB client applications (like a PHP app) to connect with? Or "user to run mongod as"?
[22:27:32] <FiftyFivePlus> i was saying the same thing as in, i am trying to figure out the level of functionality that i can afford
[22:27:47] <Dexx1_> GothAlice, aye, I want my cakephp app to connect with a mongodb database
[22:29:44] <morenoh149> what does an index by objectId mean?
[22:29:50] <morenoh149> is that a btree search?
[22:31:17] <GothAlice> morenoh149: ObjectId is a BSON type, representing a 12-byte packed binary structure. See: http://docs.mongodb.org/manual/reference/object-id/ Like any field, you can index them. This makes queries (esp. range quries, which are effectively _dates_!) efficient.
[22:31:53] <GothAlice> morenoh149: Depending on the back-end, how indexes are stored will vary. MMAPv1 uses B-Trees, AFIK. Haven't checked the new engine yet. There's a third-party engine that uses fractal trees.
[22:34:46] <dcuadrado> GothAlice: is there a way to modify an index without deleting it first?
[22:35:06] <dcuadrado> I tried creating a new one with a different name but it didn't work
[22:35:20] <GothAlice> …
[22:36:32] <GothAlice> There's all sorts of missing from your statement, and it's throwing me for a loop. No, you can't modify existing indexes. (Madness would ensue, and possibly a division by zero followed by the destruction of the Earth.) "different name" gives me pause for concern. I'd need to see just what you're doing to understand. (Gist/pastebin your commands?)
[22:37:03] <GothAlice> (With a dump of the existing indexes in the collection for comparison?)
[22:38:05] <GothAlice> I'll be back in 15 as I need to run home from work. ^_^
[22:52:45] <Dexx1_> GothAlice, I dumped the VM. I am on MAMP now, much faster on my old machine. The way I run mongoDB is via terminal .. is that ok? I want to see whats happening
[22:52:57] <Dexx1_> I also need to setup a username/password to connect to cakepHP
[22:53:00] <GothAlice> Dexx1_: Well, you won't, even running interactive.
[22:53:42] <GothAlice> Run it as a service, like the proper daemon it is, and a) tell it to output to, and then watch a log file for server activity, and b) for client activity, become familiar with the oplog.
[22:54:34] <Dexx1_> GothAlice, how do I make it run as a service on my os x machine?
[22:55:10] <GothAlice> Dexx1_: If you installed MongoDB via brew… it's easy. Did you?
[22:55:35] <GothAlice> ln -s /usr/local/opt/mongodb/homebrew.mxcl.mongodb.plist ~/Library/LaunchAgents/; launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
[22:56:14] <GothAlice> After those two commands, again, if using homebrew to install MongoDB, mongod will be running and will start automatically when you log in. To stop it, re-run the second of those two commands with "unload" instead of "load" as the first argument.
[22:57:49] <GothAlice> Dexx1_: https://gist.github.com/amcgregor/46f54e47bc2b4eef5c12 is the contents of that plist file; you can save this to the same name and path, update the ProgramArguments array to match what you need, then do the same launchctl load on it.
[22:59:34] <GothAlice> Dexx1_: Lastly, out of the box MongoDB runs without authentication. This means the client drivers operate fine without a username/password, too.
[22:59:58] <GothAlice> http://docs.mongodb.org/manual/tutorial/enable-authentication/ are the instructions on enabling authentication, however.