PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 14th of April, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:05:59] <FrenchieUser12> looks like the problem is with my insertion
[00:13:20] <GothAlice> FrenchieUser12: Note that "collection" in my examples is meant to be the name of whatever your actual collection is; the one storing the data you are trying to retrieve. If you are find_one'ing on a collection different from the one you are inserting into, you can't expect it to work. ;)
[00:13:45] <GothAlice> (In the case of my interactive shell example, the name of the collection I inserted into _and_ read from was "collection". Apologies if that was unduly confusing.)
[08:44:56] <jeanre> why would total be 0 in this case http://pastie.org/private/xuunqlqmjns2nhh0jfj8a
[08:46:00] <jeanre> even though totalBytes in the documents have data
[08:46:42] <jeanre> I think because totalBytes dataType is a string?
[09:09:05] <d7p4x> check
[09:09:34] <d7p4x> Hi guys
[09:09:58] <d7p4x> anyone there?
[13:05:14] <brainer> hello i'm just verifying if my registration is complete:)
[13:09:00] <brano543> hello, i am trying to update document and i want to add a field pois with array of objects but with no success,nothing gets added. if i try to add just array of integers,it works,but not with array of objects. I am doing BSON("$set" << BSON("pois" << pois.arr())) Can anyone help me?
[13:10:52] <StephenLynx> what language and tools are you using?
[13:11:13] <StephenLynx> I don't recall anyone using directly "BSON".
[13:11:31] <brano543> StephenLynx: i am using c++ driver. full syntax mongo.update("data.vrcholy", BSON("_id" << n_id), BSON("$set" << BSON("pois" << pois.arr())) );
[13:11:59] <brano543> StephenLynx: second parameter is query, third one is what to update
[13:12:15] <StephenLynx> have you tried to perform your operation on the shell first to make sure your logic checks?
[13:13:00] <brano543> StephenLynx: okay i can try it
[13:18:06] <brano543> StephenLynx: this works in console db.vrcholy.update( {"_id":3039828758},{$set:{"pois":[{"test":"testval"}]}})
[13:19:47] <brano543> StephenLynx: i don t know what am i doing wrong,i am creating array of objects,see https://dpaste.de/fFWH
[13:20:01] <StephenLynx> no idea, I have never used the C++ driver.
[13:20:08] <StephenLynx> you will have to dig its documentation.
[13:20:18] <StephenLynx> but at least now you are sure your query is ok :v
[13:22:33] <brano543> StephenLynx: strange thing is when i created objects exactly the same and used isnert it got inserted properly.....
[13:54:00] <brano543> StephenLynx: its strange, i am creating exactly same object as in console and it doesn´t update it
[13:55:50] <StephenLynx> more than often lower level tools will require you to learn their intricacies
[13:56:31] <StephenLynx> specially C++
[14:12:19] <brano543> StephenLynx: can it be the c++ driver doesnt support that?
[14:12:37] <brano543> StephenLynx: i have tried everything from examples and it doesn´t work
[14:53:42] <StephenLynx> brano543 I doubt it, that is a basic operation, to set a field with an fixed array.
[14:55:30] <brano543> StephenLynx: this is ridiculous,i have even tried to specify the multi option and it still doesnt work i have followed this http://www.slideshare.net/YnonPerek/mongodb-for-c-developers
[14:56:05] <StephenLynx> have you read the documentation and the driver's source code?
[14:56:28] <brano543> StephenLynx: i have read everythin i have found on that side and on official mongo site
[14:56:47] <StephenLynx> there is a reason lower level languages are not on the bottom shelf of most programmers ¯\_(ツ)_/¯
[14:57:22] <StephenLynx> http://docs.mongodb.org/ecosystem/drivers/cpp/ have you read this?
[14:58:41] <brano543> yes,this is what i have read about 1000 times in the last 2 hours
[14:59:15] <StephenLynx> welp
[14:59:31] <brano543> StephenLynx: if i just set to one value it works,otherwise not
[15:03:57] <brano543> StephenLynx: anything which is array,even from example doesn´t work with set
[15:04:43] <StephenLynx> are you able to create a document using an array as the value of a field?
[15:05:46] <brano543> StephenLynx: it worked on insert
[15:06:00] <StephenLynx> so you got right the array of objects syntax.
[15:10:31] <brano543> StephenLynx: yes,but i don´t know why it doesn´t work with update
[15:21:16] <adrian_lc> hi, how can I increment the document with the lowest value for a particular field, atomically if possible?
[15:21:39] <brano543> StephenLynx: it seems now its inserting somethign,but sometimes it inserts empty array,weird,i am sure every time is not empty
[15:22:22] <adrian_lc> e.g. db.find({'calls': <min?>}).update(calls+=1)
[15:31:49] <brano543> StephenLynx: it worked the whole time, i am an idiot.....
[15:32:09] <StephenLynx> :v :v :v
[15:32:16] <deranged> :U
[15:32:33] <StephenLynx> why did you think it wasn't working then?
[15:32:57] <brano543> StephenLynx: i was seeing the tables in GUI and there wasn´t that field
[15:33:13] <StephenLynx> heh
[15:33:16] <brano543> StephenLynx: it was there before,but i forgot it was sometimes empty
[15:33:28] <StephenLynx> yeah, GUI managers are bad for mongo.
[15:33:37] <brano543> StephenLynx: now its only present on those objects i updated
[15:34:29] <brano543> StephenLynx: you know , i need to optimize my importer to DB,because i can´t keep all the data in memory, so i insert into DB and then query
[15:53:59] <brano543> StephenLynx: can you please explain me the WriteConcern? Somehow i don´t see an option there to report me if any errors happened during the bulk update operations
[15:54:12] <StephenLynx> no idea, I just use the default wc
[15:55:58] <brano543> i also use the default wc,but where do you check for errors if any occured?
[15:56:54] <StephenLynx> I use the node.js driver, it returns me an error object as the first parameter of the callback.
[15:57:17] <StephenLynx> it is null if none occurred.
[15:57:35] <brano543> StephenLynx: i hate node.js, someone helped me to get it working here last time
[15:57:46] <StephenLynx> I actually use io.js.
[15:57:49] <StephenLynx> but the driver is the same.
[15:58:20] <brano543> those callbacks its a mess, i had to use some async library to get the stuff executioned when i needed
[15:58:30] <StephenLynx> no, callbacks are easy.
[15:58:40] <StephenLynx> async libraries are useless bloat.
[15:59:15] <brano543> well,i couldn´t get it working without it,it closed the communicatino socket while i still needed to perform soem queries
[15:59:19] <StephenLynx> git gut
[15:59:24] <StephenLynx> gud*
[15:59:36] <brano543> excuse me? what does that mena?
[15:59:42] <StephenLynx> get good
[16:00:06] <StephenLynx> you really can't blame a technology for your ineptitude.
[16:02:03] <brano543> my problem is i don´t understand how it works,i saw soem examples, someone even told me why do i call connect DB on every request,answer because i don´t understand this :( i dont know how to create global variable connection,there make connect to DB and for everz querz call it like i do it in c++ https://dpaste.de/q4hi
[16:03:03] <StephenLynx> you don't understanding something doesn't mean the technology is bad or messed. if you have discipline, callbacks are no more complicated than other forms of abstraction, such as interfaces or multiple inheritance.
[16:03:36] <StephenLynx> specially if you are a newbie.
[16:03:39] <brano543> can you point me to some materials or fix me that connect to make it global?
[16:03:58] <StephenLynx> make a class and implement a static method that holds the connection.
[16:04:24] <StephenLynx> and another static method that initializes the connection.
[16:04:59] <StephenLynx> what is your project?
[16:05:18] <StephenLynx> a web back-end that takes http requests?
[16:05:42] <brano543> can you show me some example please? my project is routing application, i have node.js server which processes queries and communicates with c++ wchich actually searches the graph and sends back JSON
[16:06:13] <StephenLynx> using C++ in the middle of that is an awful idea.
[16:06:23] <StephenLynx> and I would change node.js for io.js.
[16:06:38] <StephenLynx> and just look for static methods in C++
[16:07:27] <StephenLynx> javascript has built-in json support, you literally has to do nothing to add a js object to mongo.
[16:08:12] <StephenLynx> with javascript you can just initialize an object using var myObject = {a:'banana', b: [1,5,6]}; and then add myObject to mongo.
[16:08:19] <jaitaiwan> Hey StephenLynx... awhile back you sent me a link to one of your projects which contained awesomely formatted JS and a suggestion of a book to read. Any chance you remember that stuff still?
[16:08:37] <StephenLynx> a book?
[16:08:42] <brano543> StephenLynx: hmm,but even if the graph is stored in DB and zou can query nodes, you don´t have fast enough implementations of priority queue compared to c++
[16:09:01] <brano543> StephenLynx: that io.js is something like node.js?
[16:09:12] <StephenLynx> it is a much better and faster fork of it.
[16:09:19] <StephenLynx> all of maintainers are working on it.
[16:09:33] <StephenLynx> there is absolutely zero reason to use node.js instead of it.
[16:10:03] <jaitaiwan> StephenLynx: I can't remember but it had something to do with not writing bad code because Bad code is what causes callback and promise hell
[16:10:12] <StephenLynx> and if you are using a graph, then perhaps mongo is not the best tool for the jobs, there are dbs dedicated to graphs.
[16:10:17] <StephenLynx> ah
[16:10:19] <brano543> StephenLynx: package.json works the same way? does it support windows?
[16:10:19] <StephenLynx> is not a book
[16:10:27] <StephenLynx> yes
[16:10:49] <StephenLynx> unless you are writing native code or using native modules, it is a drop in replacement.
[16:11:06] <StephenLynx> https://gitlab.com/mrseth/bck_lynxhub this is my project and
[16:11:32] <StephenLynx> hold on, looking for the code guidelines.
[16:11:46] <StephenLynx> https://github.com/felixge/node-style-guide here
[16:13:44] <brano543> StephenLynx: thank you, i will definitely check that out. i see, io.js works the same way as node.js, i updated the dependencies with npm update anyways
[16:14:36] <StephenLynx> those were for jaitaiwan
[16:15:13] <StephenLynx> for you I can direct you to https://iojs.org/en/index.html and https://github.com/iojs/io.js
[16:16:29] <brano543> StephenLynx: thanks,i will need a time to process it. for now, i am trying to make those updates i struggled with today as bulk operation :)
[16:18:41] <StephenLynx> also, I suggest not using windows.
[16:18:52] <StephenLynx> specially if you are running an actual server.
[16:19:43] <StephenLynx> running a windows server is a laughably bad idea, and you are better developing in the environment that will be the one on the server.
[16:20:00] <StephenLynx> so not much point into headbashing to make stuff work properly under windows.
[16:21:03] <brano543> StephenLynx: its fine for me, the importer will work on windows,its easier, the server may work on windows. I am not experienced enough to provide all the dashes for clients needed to compile the dependencies under linux :D i am just a student haha
[16:21:16] <brano543> *may work on linux
[16:21:37] <StephenLynx> npm takes care of dependencies.
[16:21:59] <brano543> i mean the c++ code of my application
[16:22:14] <StephenLynx> that shouldn't be there in the first place.
[16:22:48] <StephenLynx> because node was built to take care of the queue from the ground up.
[16:23:03] <StephenLynx> do you actually have a benchmark to prove that C++ will provide a gain in your case?
[16:23:08] <brano543> i am talking about the priority queue needed for the A* search
[16:23:37] <StephenLynx> so why you are dealing with the database in your C++ code?
[16:23:59] <brano543> StephenLynx: i need to initially preprocess data
[16:24:49] <brano543> StephenLynx: i am also thinking about on-the-flz approch,that the function succesor(node) will query DB so i don´t need to keep the graph entirely in memory
[16:25:05] <StephenLynx> what about RAM?
[16:25:30] <brano543> you mean during preprocessing or RAM needed for the graph?
[16:25:30] <StephenLynx> will your C++ code free the RAM while it awaits for the IO operations to finish?
[16:25:45] <StephenLynx> I am talking about the time you are waiting for mongo to finish its thing.
[16:26:19] <brano543> i understand,but you mean while preprocessing or on the server response?
[16:26:43] <StephenLynx> whenever you query mongo with C++ code.
[16:26:59] <StephenLynx> because you see, the V8 is at most 10x slower than C++.
[16:27:15] <StephenLynx> if you expect a load big enough for that to matter, then the RAM should matter too.
[16:27:25] <StephenLynx> and io.js would take care of that
[16:27:51] <StephenLynx> my point is that you don't need C++ for what you are doing.
[16:28:15] <StephenLynx> have you tried to implement the A* search in js and benchmarked it against the C++ code?
[16:28:34] <brano543> StephenLynx: i haven´t tried that out yet
[16:28:50] <StephenLynx> you should, because using C++ is not trivial.
[16:29:16] <StephenLynx> and V8 is the fastest scripting engine that I know.
[16:29:22] <brano543> StephenLynx: i will try it, first i need to focus on the matters which is my bachelor thesis about
[16:30:02] <StephenLynx> how long is your deadline?
[16:30:21] <brano543> i have only about a month
[16:30:36] <StephenLynx> how many years of C++ experience you have?
[16:30:51] <brano543> i am not that skiller as you think. this is my second year
[16:31:02] <StephenLynx> using C++ is a bad idea for you then.
[16:31:23] <StephenLynx> don't get me wrong, I like C++ and currently I am studying C.
[16:31:32] <StephenLynx> but for you, it will hold you back.
[16:31:39] <brano543> well, i have about 1000 lines written so far :D
[16:31:40] <jaitaiwan> Thanks StephenLynx
[16:31:42] <StephenLynx> specially if you have about a month.
[16:32:11] <brano543> StephenLynx: Don´t worry, i will finsih it somehow :)
[16:32:20] <brano543> i have a lot of stress,but i am trying
[16:32:45] <brano543> StephenLynx: do you want to see the prototype? :)
[16:32:58] <StephenLynx> no
[16:33:14] <brano543> StephenLynx: okay, it was just screenshot anyways,its not onlnie yet
[16:33:26] <StephenLynx> youre not using source control?
[16:33:49] <brano543> i mean the server is not online. no i am not using git for this
[16:33:55] <StephenLynx> you should.
[16:33:56] <brano543> i am not very familiar with it
[16:34:06] <brano543> i dont know the backtrack stuff
[16:34:21] <StephenLynx> http://rogerdudler.github.io/git-guide/
[16:34:24] <brano543> we used it last year and i was so afraid of it
[16:34:35] <StephenLynx> git is the best invention since orgasm.
[16:34:54] <PedroDiogo> ey everybody
[16:34:57] <PedroDiogo> quick question :)
[16:35:06] <PedroDiogo> (as I am a total mongodb noob)
[16:35:36] <StephenLynx> but again, as everything that is important, will not work very well on windows because it is an useless pile of radioactive trash.
[16:35:46] <PedroDiogo> is it wise to use one single model in mongodb for my whole application ?
[16:35:55] <StephenLynx> what do you mean, pedro?
[16:36:07] <StephenLynx> a single collection?
[16:36:16] <PedroDiogo> yes, a single collection
[16:36:23] <StephenLynx> no.
[16:36:27] <StephenLynx> it is a bad idea.
[16:36:47] <StephenLynx> unless all your objects can be fit under this collection purpose.
[16:37:03] <StephenLynx> but you need to store data of cars and people, create a collection for cars and a collection for people.
[16:37:10] <StephenLynx> if you need*
[16:38:02] <PedroDiogo> I'm developing a single chat application with 1-1 chats only
[16:38:14] <StephenLynx> so you need to store messages at least.
[16:38:17] <StephenLynx> anything else?
[16:39:24] <PedroDiogo> for this, I'm using a single Schema on my nodejs app for messages only with from, to, message, timestamp and lastRead parameters
[16:39:45] <StephenLynx> use io.js instead of node.
[16:39:57] <StephenLynx> it is everything node is but more, better and faster.
[16:40:03] <PedroDiogo> so I just query 'to' and 'from' to get the needed messages
[16:40:08] <StephenLynx> and you mentioned schema? are you using mongoose?
[16:40:16] <PedroDiogo> yeah I'm using mongoose
[16:40:29] <StephenLynx> it is bad, I wouldn't recommend it to my worst enemy.
[16:40:47] <PedroDiogo> damn looks like I'm doing everything wrong :)
[16:40:53] <StephenLynx> do you have accounts for the users? or you just trust they are who they clam to be?
[16:41:08] <PedroDiogo> so: one "schema" is fine, but I should use mongodb's official nodejs driver + io.js - right ?
[16:41:18] <StephenLynx> yes, that is what I use.
[16:41:32] <StephenLynx> works like a charm.
[16:41:36] <PedroDiogo> all of them have an appropriate account
[16:41:47] <StephenLynx> so you need a separate collection for the accounts.
[16:41:56] <StephenLynx> so far that is 2 collections.
[16:42:09] <PedroDiogo> express authenticates them before activating the socket.io communication
[16:42:16] <StephenLynx> express is really awful too.
[16:42:29] <PedroDiogo> I'm saving all of the non-chat data at orchestrate.io
[16:42:37] <StephenLynx> never heard about it.
[16:42:42] <PedroDiogo> and the chata-only data with mongoose
[16:43:12] <StephenLynx> any particular reason you can't store the accounts in mongo too?
[16:43:25] <StephenLynx> and socket.io? you really need http fallbacks?
[16:43:39] <StephenLynx> I used the websockets module and it worked pretty well.
[16:43:55] <PedroDiogo> no special reason, I just like orchestrate.io's flexibility and abstraction
[16:44:20] <StephenLynx> so it is like mongo but not fast enough so you store the messages on it?
[16:44:34] <PedroDiogo> I just think socket.io is easier to use for this single purpose which is a simple chat application - thats all
[16:44:37] <StephenLynx> really, it sounds very redundant if you are using mongo somewhere.
[16:44:55] <StephenLynx> doesn't socket.io requires you to use a specific library on your front-end?
[16:45:18] <StephenLynx> or it is simple to communicate with a server using it?
[16:45:51] <PedroDiogo> it is simpler to work with my backend application (express)
[16:46:08] <StephenLynx> which is awful.
[16:46:12] <StephenLynx> and slow.
[16:46:15] <PedroDiogo> xD
[16:46:15] <StephenLynx> and complicated.
[16:46:29] <StephenLynx> have you tried the websockets module? it is very easy to use.
[16:46:33] <PedroDiogo> what is your recommendation then for a web app?
[16:46:41] <StephenLynx> io.js + mongo driver.
[16:46:58] <PedroDiogo> i mean for the http part
[16:47:03] <StephenLynx> io.js
[16:47:10] <PedroDiogo> so no web frameworks ?
[16:47:19] <StephenLynx> no, they came from satan's toilets.
[16:47:26] <PedroDiogo> lol
[16:47:38] <PedroDiogo> but I need some frameworks as it eases my work
[16:47:40] <StephenLynx> they add no functionality at all, while bringing down your performance.
[16:47:51] <StephenLynx> while adding complexity and vulnerabilities.
[16:47:55] <PedroDiogo> but it is simpler to code
[16:47:58] <StephenLynx> no its not.
[16:48:19] <StephenLynx> they throw the default workflow out of the window
[16:48:26] <PedroDiogo> i understand you, but I can not develop the whole web app with http
[16:48:35] <StephenLynx> you don't need them for http.
[16:48:40] <StephenLynx> try not using them for once.
[16:48:46] <StephenLynx> let me link you a project of mine.
[16:49:07] <StephenLynx> the spec alone has over one thousand lines
[16:49:11] <StephenLynx> https://gitlab.com/mrseth/bck_lynxhub
[16:49:46] <StephenLynx> and I have another project developed at my company that is exactly what you are doing, a 1x1 chat.
[16:49:57] <PedroDiogo> it is a real time web app with a REST web service bellow where I need to pass and receive special JSON to different services and the front end as well
[16:49:59] <StephenLynx> with nothing but io.js
[16:50:11] <StephenLynx> yeah, I use JSON too for my requests and responses.
[16:50:22] <StephenLynx> you just grab the request body and parse using json.
[16:50:35] <StephenLynx> again, you don't need a bloated and slow framework for that.
[16:50:42] <StephenLynx> they add LITERALLY zero functionalities.
[16:51:02] <PedroDiogo> yeah I know, but I actually like the express way of doing things with modules, routes and all that. It eases the workflow with my colleagues
[16:51:21] <StephenLynx> well, if you LIKE using bad technology, then I have no arguments for that.
[16:51:23] <StephenLynx> good luck.
[16:51:41] <PedroDiogo> i understand it may slow things down a bit (I really do - I'm new to node.js and mongo, but not a new programmer), but, for this project, I must do so
[16:51:56] <StephenLynx> you really don't must.
[16:51:57] <PedroDiogo> its ok StephenLynx, I appreciate your input, seriously!
[16:52:28] <PedroDiogo> i will upgrade to io.js later
[16:52:34] <PedroDiogo> and will ditch the mongoose driver right now
[16:52:52] <StephenLynx> mongoose is an ODM, not a driver.
[16:55:15] <PedroDiogo> ok
[16:56:12] <PedroDiogo> will take a look at your project in a bit
[16:57:37] <StephenLynx> the meat of it is in the pages directory.
[16:59:59] <PedroDiogo> watching it right now - that is some pretty cool code ;)
[17:00:57] <StephenLynx> yeah, I follow a very strict guideline.
[17:01:33] <StephenLynx> forgot to link the guideline in that particular project.
[17:01:47] <StephenLynx> and to update the readme, it still says node is a dependency instead of io.js
[17:02:47] <PedroDiogo> já reparei (sou português :))
[17:02:58] <StephenLynx> I know ~pedro@13.120.114.89.rev.vodafone.pt
[17:03:04] <PedroDiogo> y
[17:05:57] <PedroDiogo> I also want to migrate from orchestrate.io to my own MMS solution... do you recommend any server to do so?
[17:06:06] <PedroDiogo> also, what does ODM stands for
[17:06:08] <PedroDiogo> ?
[17:06:13] <StephenLynx> object data model I guess.
[17:07:58] <StephenLynx> it creates a clusterfuck so you have to type a little less and makes your code dependent on it forever so you can say you use hip technologies which is not a problem since you won't have to maintain the project after you lose your job.
[17:12:22] <PedroDiogo> I've created my own job, so no problems there...yet!
[17:13:48] <PedroDiogo> thinking of going with linode for the MMS solution - any word on them?
[17:14:15] <StephenLynx> afaik
[17:14:26] <StephenLynx> MMS is the 10gen mongodb service.
[17:14:41] <StephenLynx> if you host it on a regular dedicated server, it is just a mongo server running.
[17:14:51] <StephenLynx> and I used linode once, it was pretty good.
[17:14:58] <StephenLynx> and others here recommend them aswell.
[17:15:07] <StephenLynx> they are just very expensive concerning storage.
[17:18:05] <PedroDiogo> really? I found them cheap, actually (24GB for 10USD)
[17:18:14] <PedroDiogo> but I dont know that many options
[17:18:48] <StephenLynx> GothAlice mind linking that price chart you got?
[17:18:52] <StephenLynx> my copy is at home
[17:19:28] <PedroDiogo> oh wait
[17:19:37] <StephenLynx> to put things in perspective, see how much it costs to store a single terabyte with linode.
[17:19:40] <PedroDiogo> Alice has given me a screenshot of it in the past i guess
[17:19:43] <StephenLynx> yeah
[17:20:05] <StephenLynx> the best place offers 1tb per 24 bux if I am not mistaken
[17:20:15] <PedroDiogo> http://s.webcore.io/image/0t1x2Q2L1u0E
[17:20:17] <StephenLynx> it just requires you to buy a fuckton of space
[17:20:45] <PedroDiogo> were you talking about that particular chart?
[17:21:20] <StephenLynx> yes
[17:21:35] <StephenLynx> 40 bucks per month per terabyte
[17:21:48] <StephenLynx> with linode you will be paying thousands of dollarts per terabyte per month
[17:22:40] <StephenLynx> hurr alt+f4'd by accident
[17:24:01] <StephenLynx> ok, not thousands :v
[17:24:11] <StephenLynx> but around 12x more.
[17:25:52] <GothAlice> StephenLynx: https://twitter.com/GothAlice/status/582920470715965440
[17:26:01] <GothAlice> (Sorry for the delay; at a conference at the moment.)
[17:26:12] <GothAlice> PedroDiogo: Also that. ;)
[17:26:33] <StephenLynx> np
[17:27:27] <PedroDiogo> damn
[17:27:32] <PedroDiogo> that is way expensive
[17:27:56] <PedroDiogo> the thing is - i dont really know how much GBs my app will need
[17:28:26] <PedroDiogo> when in doubt, always aim for the cheaper, right? :p
[17:29:09] <GothAlice> Pick two: good, fast, or cheap.
[17:30:52] <PedroDiogo> does not compute :(
[17:37:25] <StephenLynx> yeah, I don't think linode is bad for development or small projects.
[17:37:39] <StephenLynx> just keep in mind that if you need space, it won't be cheap.
[17:39:13] <PedroDiogo> I can always transfer my data to a cheaper alternative when using MMS, right ?
[17:39:36] <PedroDiogo> i just think that a 1x1 chat won't use that many space
[17:40:22] <PedroDiogo> here is a typical chat:
[17:40:46] <StephenLynx> yeah, I don't think you will have any storage issues.
[17:40:47] <PedroDiogo> https://gist.github.com/PedroDank/e736874689524549c3a2
[17:41:12] <StephenLynx> and what is __v?
[17:41:19] <PedroDiogo> I have no idea
[17:41:25] <PedroDiogo> thats mongoose i guess
[17:41:29] <StephenLynx> :v
[17:41:39] <PedroDiogo> im still testing
[17:42:31] <PedroDiogo> this is mongoose's schema: https://gist.github.com/PedroDank/f2932c0f1f297da8437f
[17:43:35] <PedroDiogo> no idea why it keeps saving __v
[17:58:48] <Diegao> hi, I would like to compare two collections (one original and its copy) to get the different records
[17:59:27] <Diegao> these two collections were generated in different scenarios, so I would like to see the difference between then
[18:10:32] <chairmanmow> I'm trying to update a record and push to two arrays inside the document. I've done it successfully with one array, but the second one doesn't get pushed, and mongo doesn't throw an error. Is there anything glaringly wrong with this syntax ? : Item.update({_id:updateQuery.item._id},{$push:{logs: updateQuery.logToPush, assignments:updateQuery.assignmentToPush}}
[18:32:46] <malderete> hi all!
[18:44:00] <StephenLynx> chairmanmow it is failing to update a second document or the second array in the document?
[18:52:30] <chairmanmow> It's failing to update the second array StephenLynx
[19:31:44] <GothAlice> chairmanmow: http://showterm.io/2dbeeb034d3a13c23b9c0 < works for me
[19:32:29] <StephenLynx> wow, I never heard of that site before
[19:32:34] <GothAlice> :)
[19:32:48] <GothAlice> I find it handy to force people to slow down and watch instead of throwing a wall of code at them in a gist.
[19:33:39] <StephenLynx> I just skip to the end
[19:33:45] <GothAlice> One could do that, yes.
[19:33:49] <StephenLynx> but I found it neat, though :v
[19:33:59] <GothAlice> Skipping around can screw up the VT, though.
[19:34:14] <StephenLynx> they should add a button "skip to end"
[19:34:25] <StephenLynx> so it would skip to the end safely for impatient people.
[19:34:31] <chairmanmow> yeah, that's pretty cool, thanks GothAlice!
[19:34:42] <GothAlice> Unfortunately to get there it literally has to replay every step to build up the final result; it's not like a video file with keyframes, here.
[19:36:42] <StephenLynx> yeah, it would require a little effort.
[19:36:54] <StephenLynx> but being forced to wait to the end is kind of a weak point.
[19:37:05] <GothAlice> Not if slowing people down is the purpose. :)
[19:37:06] <StephenLynx> at least to get it safely to the end
[19:37:17] <GothAlice> If I wanted to demo something fast, I'd gist it.
[19:37:29] <StephenLynx> if people just alt+f4 and start demonizing the site, then it will never take off.
[19:37:33] <StephenLynx> because they had to wait.
[19:37:56] <StephenLynx> making the wait mandatory is kind of bad.
[19:40:23] <GothAlice> StephenLynx: It's not my site.
[19:40:26] <GothAlice> So… uh… meh?
[19:40:53] <GothAlice> Amount of caring about people alt+f4'ing == zero. ;)
[19:44:37] <StephenLynx> consider this:
[19:44:41] <StephenLynx> I love to argue :3
[19:46:55] <GothAlice> ¬_¬ I've noticed.
[19:51:14] <StephenLynx> http://i.imgur.com/9Zn4Rro.jpg
[19:52:00] <GothAlice> The difficulty I have: I enjoy a _good_ argument. Aw snap. ;)
[19:52:43] <GothAlice> (Saying something is unbearably slow when the whole point is for it to be slow a good argument does not make.)
[20:06:37] <pjammer> if mongod process was using 75%+ cpu and then dropped to under 1%, yet currentOp() didn't have anything in it... can i find out why the sudden drop occured?
[20:06:50] <pjammer> like through logs?
[20:07:08] <GothAlice> pjammer: If you have "slowMs" profiling enabled, the query/op that caused the spike may appear in your logs.
[20:07:29] <GothAlice> If you don't have that profiling level (I believe it's 1) enabled, it likely won't show.
[20:08:42] <pjammer> it's been sucking that cpu % since the weekend, after we killed some Index job (long story) but i've been checking currentOp for days and it's been blank with no queries.
[20:08:57] <pjammer> so it's strange. like it would show up in currentOp right?
[20:09:16] <GothAlice> Aye; a background index operation would show up in the list of active operations… if that's what it was doing.
[20:09:23] <pjammer> and thanks @GothAlice checking.
[20:09:29] <GothAlice> High apparent CPU load can also be caused by extreme IO lag.
[20:10:02] <pjammer> and to see what causes this extreme IO lag? i'm at a loss here right now.
[20:10:13] <pjammer> just inherited the box so i'm all ears to anything
[20:10:19] <GothAlice> htop/iotop/iftop are your friends.
[20:10:41] <pjammer> yeah i ran top but it was just mongod rocking the resources
[20:10:49] <GothAlice> htop breaks things down by thread.
[20:10:55] <GothAlice> (Amongst many, many other goodies.)
[20:11:06] <GothAlice> iotop breaks IO utilization down by device.
[20:11:13] <pjammer> will be installing top let me down for the last time.
[20:11:13] <GothAlice> (And reads/writes/etc.)
[20:11:27] <pjammer> thanks for this @GothAlice
[20:11:30] <GothAlice> iftop is a network interface breakdown.
[20:18:59] <dblado> any mms folks around?
[21:59:45] <harttho> Is there a command to get the size of all databases (or only 1 at a time)?
[22:04:53] <GothAlice> harttho: http://docs.mongodb.org/manual/reference/method/db.collection.stats/ will get you stats by collection, http://docs.mongodb.org/manual/reference/method/db.stats/ for a whole database at once.
[22:06:24] <harttho> GothAlice: Thanks, I guess I do see the reason that another level up doesn't exist haha
[22:06:24] <GothAlice> If you're looking for the on-disk size of all, you can just sum those up from the files on disk. (du --total) Otherwise, you'll have to iteratively collect each DB's stats and aggregate.
[22:06:35] <harttho> Yup
[22:06:36] <harttho> Thanks!
[22:51:12] <pjammer> Single master... when is the right time to switch to replication if you want reads to always be available when called from your web app. i have stats to aid the convo too
[22:55:10] <GothAlice> If you want high-availability, you want a replica set. So… immediately? :)
[22:56:21] <pjammer> heh, so true. i'd even take 'before the outage'
[22:56:46] <pjammer> oh this is mms too right?
[22:56:52] <pjammer> chat room that is
[22:57:27] <pjammer> if an existing /data directory is owned by root, will changing ownership to mongodb, mess it up, for lack of a better word?
[22:57:54] <pjammer> I'm trying to eventually get an automation agent on this existing build
[22:58:09] <cheeser> eventually? install it today!
[22:58:13] <GothAlice> You'll need to restart the process as the correct user anyway, so step 1: stop the mms processes, step 2: chown, step 3: re-start as the mongodb user.
[22:58:26] <pjammer> cool cool
[22:58:32] <GothAlice> Replace step 1 with: stop the existing process if MMS is not yet installed. ;)
[22:58:44] <pjammer> i have the monitoring agent
[22:59:00] <pjammer> but no automation, that's how old school we are.
[23:10:31] <pjammer> so in mms Btree and Journal Stats both took nosedives, and then my Queues, Opscounters,Background Flush Avg all went down to normal or 0 levels.
[23:11:12] <pjammer> how do i decifer what that means? #you_are_my_only_hope
[23:11:22] <pjammer> decipher if we're being pedantic
[23:12:00] <pjammer> i got a fancy graph, and will make cookies.
[23:12:03] <pjammer> or gin.