PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Friday the 15th of August, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:36:18] <Faeronsayn_> Hi, anyone here?
[00:37:02] <joannac> There are lots of people here
[00:37:29] <llakey> is the only possible way to disable journaling to use the --nojournal flag or is there a way to specify that in the config?
[00:38:14] <Boomtime> http://docs.mongodb.org/manual/reference/configuration-options/#config-file-format
[00:38:36] <Boomtime> one of the examples is journal setting, setting it false should work
[00:39:19] <llakey> saw that. i tried journal = false and journal files were still created
[00:39:58] <Boomtime> you literally wrote "journal = false"?
[00:40:08] <Boomtime> or "enabled: false"
[00:40:46] <llakey> literally journal = false from this example: http://docs.mongodb.org/manual/administration/configuration/
[00:41:03] <Faeronsayn_> @joannac I keep getting this error: ReferenceError: mongoimport is not defined when I try to use mongoimport
[00:41:23] <joannac> where are you using that?
[00:41:44] <Boomtime> @llakey: i quoted the YAML file format, which version of mongod are you using?
[00:42:04] <Faeronsayn_> @joannac I am trying to convert my mysql database into mongodb and will be importing csv files
[00:42:31] <llakey> Boomtime: 2.6.3 the config which shipped with the arch linux package isn't in yaml format. is the yaml format required for disabling journaling?
[00:42:47] <Boomtime> it should not be, just so long as you are consistent
[00:45:36] <llakey> ok. that's why i stayed with the k = v pattern. i was hoping journal = false from the example config would also work
[00:49:40] <Boomtime> gack...
[00:49:48] <Boomtime> nojournal=true
[00:50:00] <Boomtime> old format is stupid, no wonder it was changed to YAML
[01:04:53] <llakey> Boomtime: cool. i'll check it out
[01:13:56] <llakey> Boomtime: that works. thanks!
[01:38:38] <balakalaka> is there some online documentation for libbson?
[01:42:06] <balakalaka> how do I create a date in libbson?
[01:42:46] <joannac> llakey: I hope you have good backups if you're running without a journal
[01:43:23] <balakalaka> yooooo
[01:43:36] <balakalaka> how do i create a date type using the c mongo driver?
[01:43:54] <llakey> joannac: for me, i like to use nojournal when testing because i don't want to wait for journal files to be created, because we're just testing. in production, we do journal and backup
[01:47:21] <balakalaka> hello?
[01:47:59] <Boomtime> patience, all good things to those who wait
[01:48:35] <Boomtime> (also, i'm afk for 20 mins)
[01:49:04] <balakalaka> theres like 5 million people in this channel
[01:49:34] <balakalaka> am i to guess the mongo c driver is not used very much?
[01:49:48] <balakalaka> there seems to be almost no info on it online
[03:00:31] <Boomtime> "balakalaka: am i to guess the mongo c driver is not used very much?"
[03:00:50] <Boomtime> @balakalaka: the C driver is not officially released, it is at 0.98 i believe
[03:02:07] <Boomtime> i think you should definitely expect the docs to lag behind as the maturity of the C driver comes up to speed, with that said, the C driver should reflect in a C-style-of-design roughly what the other drivers all present as an API
[03:21:57] <Faeron> Hey guys, where would I check if my mongoimport fails (it doesn't give me an error message :( )
[03:28:03] <Faeron> Hey guys, how would I reference a object_id?
[03:47:02] <awinn> Hi, not sure about the etiquette (new to IRC), is there someone that could help me with a quick question?
[03:47:54] <Faeron> I am pretty new
[03:47:55] <Faeron> but I can try
[03:48:27] <awinn> ok, its about the geospatial search
[03:48:37] <awinn> I found conflicting info on stack overflow
[03:48:52] <awinn> should I chat you directly or just post here?
[03:49:16] <Boomtime> post here
[03:49:22] <awinn> ok, thank you.
[03:49:37] <awinn> I have a 2d index and I am searching using $near
[03:50:14] <awinn> I want to set maxDistance but I need to convert from input in miles
[03:50:58] <awinn> people are giving different formulas online using the earths radius and whatnot but it doesnt work
[03:57:01] <Boomtime> setting aside the conversion from miles for a moment, does a $near query work when you just stuff a value of 1 in for maxDistance?
[04:00:12] <awinn> no, I am using coordinates that match a document too, but I have to put in a large number aprox 14 thousand for it to find the document
[04:00:39] <Boomtime> ok, so the conversion is not the first problem, let's solve the first problem
[04:01:10] <awinn> ok.. sounds good. where should i start?
[04:01:41] <Boomtime> can you provide the doc extract coordinates (the bit which is indexed as "2d" (or 2dsphere?)
[04:01:50] <Boomtime> and the query you are using
[04:02:51] <awinn> sure.
[04:03:55] <awinn> -111.97, 40.6
[04:05:56] <awinn> Im using mongoose its query.where('loc').near(latitude,longitude).maxDistance(distance)
[04:06:47] <awinn> obviously that isn't the entire query I could put it all in a gist too if you want to see it
[04:08:23] <Boomtime> i don't know how mongoose implements "near" but be aware that coordinates in the 2d indexes must be specified longitude first
[04:09:18] <Boomtime> this is also true when the coords are passed to the find system in the javascript driver which mongoose uses
[04:09:20] <Boomtime> http://docs.mongodb.org/manual/reference/operator/query/near/#examples
[04:10:10] <Boomtime> i would suggest you stop using mongoose for the moment and get your query to work in the shell, it should translate pretty easy from there to mongoose
[04:10:39] <Boomtime> by the 'shell' in 'mongo shell'
[04:10:48] <Boomtime> *i mean
[04:11:01] <Faeron> @Boomtime do you know any good http rest api plugins I can use for meteor?
[04:11:04] <awinn> yes, that is a good idea. I have to admit I didn't think about using the shell
[04:11:43] <Boomtime> @faeron: i know all those words but not in that arrangement, sorry
[04:12:45] <Faeron> @boomtime, haha alright :P
[04:13:21] <awinn> I did log the query object and it did look like it was assembling it correctly however I was assuming the lat long is in right order because it isnt logging that part out completely
[04:14:09] <awinn> I will try the shell and log out the coordinates after the query is assembled.
[04:14:17] <Boomtime> http://docs.mongodb.org/manual/reference/parameters/#param.logLevel
[04:14:18] <awinn> thank you.
[04:14:42] <Boomtime> maybe try increasing logLevel to 1 or 2 before running it too, maybe it will provide more information
[04:15:16] <Boomtime> anything other than zero generates enormous logs, always return that to zero asap
[04:19:37] <Faeron> @Boomtime, how can I tell mongodb to create my documents with string _ids instead of object_ids ?
[04:20:02] <cheeser> pass it string _ids
[04:20:45] <Faeron> @cheeser, I am using mongoimport and it auto generates the _ids so how would I let mongo import know about this?
[04:21:03] <cheeser> where did the import file come from?
[04:21:37] <Faeron> I'm just using .json
[04:21:51] <cheeser> something made that file.
[04:21:53] <Faeron> and I am exporting from mysql (but in json format)
[04:21:56] <Faeron> mysql
[04:22:13] <cheeser> what was your PK in mysql?
[04:22:23] <cheeser> can you tell mysql to rename that column to _id ?
[04:22:47] <Faeron> I can... but doesn't mongodb not use auto-incrementing ids?
[04:23:03] <Boomtime> only if you don't instruct it otherwise
[04:23:11] <Boomtime> you can't avoid having an _id, if you don't supply one it will be generated for you as ObjectId
[04:23:50] <Faeron> so there is no way of telling mongodb to use string instead of objectId for _id?
[04:23:55] <Boomtime> the best option is to claim the _id for your own purposes, if you have a unique pre-existing field which you use as PK in mysql then it's got _id candidate written all over it
[04:24:27] <Boomtime> yes there is, just not with mongoimport
[04:24:46] <Faeron> is there a way I can mass update after the import?
[04:24:50] <Boomtime> you can set _id to whatever you want, but what you are doing is not setting it at all
[04:25:03] <cheeser> Faeron: mongodb does not
[04:25:27] <cheeser> and you can't change a document's _id
[04:25:47] <Faeron> yeah, because I want mongodb to set those ids
[04:25:54] <awinn> Boomtime: thank you, I just looked at my query again and lat was first
[04:26:01] <awinn> working now
[04:26:02] <Faeron> @cheeser, when referencing the _id, in another table.. how would that work if it's an objectId
[04:26:10] <Boomtime> @awinn: awesome
[04:26:17] <cheeser> Faeron: come again?
[04:27:04] <Faeron> oops when referencing an _id from one collection in another, how would that work if it's an objectId
[04:27:33] <cheeser> it's a DBRef either way. it has a value for the collection and the _id
[04:27:35] <Boomtime> how do you plan to do it as a string?
[04:27:43] <cheeser> the value can be whatever you want it to be.
[04:27:51] <Faeron> just setting it, that's what mongodb docs recommend.
[04:28:07] <Faeron> if I use a string, will i be able to match a string with an objectId?
[04:28:20] <cheeser> why would you have an ObjectId?
[04:28:28] <Faeron> my _id is an objectId
[04:28:43] <cheeser> unless you give it your actual id value
[04:29:01] <Faeron> cheeser
[04:29:07] <awinn> now with the conversion do I divide the distance by the radius of the earth then?
[04:29:46] <Faeron> lets say I have tv shows and episodes. in my episode document I have a show_id, what should I set this show_id to? The string version of the objectId?
[04:30:38] <cheeser> what is that value in mysql?
[04:30:57] <Faeron> just a number
[04:31:33] <cheeser> then use a number in mongo when you import it
[04:32:17] <Faeron> @cheeser, mongo will then generate it's own _ids for new records that will look weird since they will be different types
[04:32:27] <cheeser> not if you give it an _id
[04:32:46] <cheeser> when you export from mysql, rename your pk column to _id
[04:32:49] <Faeron> is it possible for auto incrementing ids in mongodb?
[04:33:02] <cheeser> http://docs.mongodb.org/manual/tutorial/create-an-auto-incrementing-field/
[04:33:08] <cheeser> not like you're used to, no.
[04:33:32] <cheeser> you have existing data. why would you want to generate new IDs?
[04:34:13] <Faeron> I want to update to the mongodb way, I feel like auto-incrementing fields aren't really encouraged for mongo
[04:34:32] <cheeser> they're not for the most part
[04:35:34] <Faeron> so back to my original question, should I put the ObjectId in the show_id field?
[04:35:58] <cheeser> why would you? you have a value there already.
[04:36:16] <Faeron> I will update it to the new tv show ids which would now be object ids
[04:37:00] <cheeser> you'll need to update all your FKs, then, with the newly generated ObjectIDs.
[04:37:07] <cheeser> not hard, but will take a little scripting.
[04:40:04] <Faeron> yeah, don't have too many realtionships atm, so I feel like it's not too big of a deal (saves me a headache later where I am unable to use some cool mongodb stuff because my ids are all over the place)
[04:40:21] <Faeron> so referenceId I should use ObjectId?
[04:40:54] <cheeser> i prefer ObjectIDs personally
[04:41:24] <Faeron> What's the advantages of ObjectIds over strings?
[04:42:28] <cheeser> you don't have to generate them yourself
[04:42:59] <Faeron> _id that are strings are not generated by mongodb?
[04:43:30] <cheeser> no. mongodb generates ObjectIDs
[04:43:33] <Boomtime> "(2:26:37 PM) awinn: now with the conversion do I divide the distance by the radius of the earth then?"
[04:43:39] <awinn> hey anybody: I am using maxDistance/(3959* 3.14/180) for miles to radians but it appears to be a little innacurate. is it because im not using pi
[04:43:46] <Boomtime> to get radians, yes
[04:43:54] <awinn> @Boomtime thanks
[04:44:04] <awinn> if i use the math object for pi will it get more accurate?
[04:44:22] <Faeron> ahh ok, and they should be fine used as reference ids?
[04:45:00] <cheeser> of course, it's fine.
[04:45:11] <cheeser> *anything* would be fine.
[04:45:37] <Faeron> performance wise?
[04:45:42] <Boomtime> maxDistance/(3959* 3.14/180) <- this looks like degrees..?
[04:45:59] <Boomtime> but i don't know what the hell it is really
[04:46:01] <cheeser> it's an index lookup either way
[04:46:23] <cheeser> it's almost 1am, though. i need to go to bed.
[04:46:25] <Faeron> that's true
[04:46:32] <Faeron> yeah I'm off to ( 1am here as well)
[04:46:45] <awinn> oops, yes
[04:46:51] <awinn> it might be.
[04:47:32] <Boomtime> what is your index? 2d or 2dsphere?
[04:48:33] <awinn> just 2d
[04:49:33] <awinn> It looks like it does get more accurate when I put more digits of pi in. I will use Math.PI then
[04:50:03] <Boomtime> i think your queries are cartesian with a 2d index
[04:50:17] <Boomtime> meaning the maxDistance would be in meters
[04:50:25] <Boomtime> because radians makes no sense
[04:50:58] <Boomtime> i don't know the correct conversions for that case
[04:51:29] <awinn> ok, its all good. according to google maps the points I have are 27 miles apart, and it is finding them at 32
[04:51:39] <awinn> not bad level of accuracy for my purposes
[04:51:47] <awinn> I will work on it some more later
[04:51:51] <awinn> thanks for the help again
[04:51:57] <Boomtime> i think you are using the wrong index
[04:52:04] <Boomtime> -> "Do not use a 2d index if your location data includes GeoJSON objects."
[04:52:29] <Boomtime> -> "The 2d index supports calculations on a flat, Euclidean plane."
[04:52:47] <Boomtime> so your comparisons to google earth are invalid
[04:53:01] <awinn> oh, you are right
[04:53:15] <Boomtime> it will work close to the equator, and near the meridian
[04:53:20] <awinn> and google obviously isnt using flat
[04:53:35] <Boomtime> the further you go the worse it will get until it breaks down into "stupid"
[04:54:06] <awinn> interesting...
[04:54:15] <Boomtime> you want a 2dsphere index
[04:54:24] <Boomtime> then use radians for distance
[04:54:35] <Boomtime> which is much simpler calculation and does not require PI at all
[04:55:16] <Boomtime> (well, pi is the unit base so it's there but not visible and you don't suffer a rounding error from that particular step)
[04:55:41] <awinn> ok. and it does say that it supports the legacy coordinates for that index too unless I'm mistaken
[04:55:51] <Boomtime> i believe so
[04:56:25] <awinn> Ill make the switch then.
[04:56:46] <awinn> I'm going to collapse in bed now..
[05:14:54] <balakalaka> is there a limit for the number of documents in a collection by default?
[05:15:04] <balakalaka> seems to be ~600k
[05:15:07] <Boomtime> no
[05:15:24] <balakalaka> hmm im using mongoose to batch insert documents
[05:15:33] <balakalaka> and only 600k get inserted
[05:15:52] <Boomtime> did you check the response?
[05:16:07] <balakalaka> nope, gona do that now
[05:18:21] <balakalaka> wierd
[05:18:34] <balakalaka> no errors, but it just stops
[06:08:49] <zereraz> hello I have a doubt in mongodb, why can't I do this in update {$inc:{votes[optionNo]:1}, where votes is an object, and optionNo is a string
[06:09:57] <zereraz> I get error on the '['
[06:10:57] <zereraz> ?
[06:11:23] <zereraz> exact error SyntaxError: Unexpected token [
[06:11:50] <zereraz> we can do this in normal javascript
[06:11:53] <Boomtime> what do you expect to happen?
[06:12:14] <zereraz> I want it to increase the value of votes.optionNo
[06:12:22] <Boomtime> then say that
[06:12:32] <zereraz> optionNo is a string
[06:12:40] <Boomtime> -> {$inc:{"votes.optionNo":1}
[06:12:48] <zereraz> I want the property to be the string that is stored in optionNo
[06:12:54] <zereraz> that will make a property called optionNo
[06:12:57] <zereraz> in votes
[06:13:12] <Boomtime> ah, you mean to say that you have gone and named keys using data?
[06:13:20] <zereraz> I want to make the string stored in optionNo like "yes" to become the property name
[06:13:24] <zereraz> yes
[06:13:39] <zereraz> I would like to do that
[06:14:08] <zereraz> won't mongodb automatically create it if it see's that it does not exist
[06:14:16] <Boomtime> that isn't the problem
[06:14:17] <zereraz> as I am using it in update
[06:14:35] <Boomtime> the problem is that you can't give a concise instruction on what it is you want to happen
[06:14:54] <zereraz> how do I achieve this in mongodb then?
[06:15:01] <zereraz> because this works in simple javascript
[06:15:03] <Boomtime> you design a schema
[06:15:22] <Boomtime> you do not keep data in keys, ytou put data in values
[06:15:25] <zereraz> the thing is votes will have dynamic properties
[06:15:35] <zereraz> I know
[06:15:55] <zereraz> lets say the property of votes in each document will be of different
[06:15:59] <zereraz> I can't make it before hand
[06:16:10] <Boomtime> bollocks
[06:16:13] <zereraz> yeah
[06:16:25] <zereraz> its a polling site
[06:16:39] <Boomtime> { key: "nameofproperty", votes_count: <int> }
[06:16:40] <zereraz> where users can increase the number of options
[06:16:53] <Boomtime> now use an array of that
[06:17:01] <zereraz> Boomtime: that is good, I should have thought of that
[06:17:08] <zereraz> thanks
[06:17:08] <Boomtime> :)
[06:17:15] <zereraz> 1 more thing
[06:17:34] <zereraz> I am a new developer and not very experienced with schema's and its design
[06:17:56] <zereraz> so can I ask help here on how to design a good schema , as my current design sucks
[06:18:17] <Boomtime> you will get better
[06:18:24] <Boomtime> by testing
[06:18:55] <zereraz> but I would like advice on how to improve my schema
[06:19:09] <Boomtime> before you even try to design a schema, make sure you know what you want to do - not what you want to *store* (that part is easy) - i mean, really know what you want to do with your data
[06:19:43] <zereraz> hmm, yeah that is true. Do you people use any tool to plan and design?
[06:19:53] <Boomtime> given what you want to achieve, it is really just a matter of trail and error to find a data layout/form/structure that works well to achieve it
[06:20:18] <zereraz> because I normally have no clue what I want to do, I just some how hack at it to make it work(which I know is a very bad way :( )
[06:20:20] <rh1n0> thats the damn truth - im working on untangling a mongodb setup because the guy who did it didnt know how to properly design the schema. 24 second query times? no thanks
[06:20:45] <rh1n0> (pardon the trolling)
[06:21:06] <zereraz> how do you properly design a schema
[06:21:08] <joannac> :/
[06:21:35] <Boomtime> rh1n0: it is a common problem, people come from SQL where they spend all the time constructing clever queries to achieve the outcome, in mongodb you should spend all your time designing a clever schema
[06:21:51] <rh1n0> zereraz thats a loaded question :) it takes experience
[06:22:11] <rh1n0> Boomtime exactly
[06:22:25] <zereraz> rh1n0: that is true
[06:22:28] <rh1n0> zereraz study the mongo docs - they are quite good
[06:22:43] <zereraz> rh1n0: yeah I do refer to them from time to time
[06:22:48] <Boomtime> how do you properly [design a schema] / paint a masterpiece / be a race car driver / ...
[06:23:00] <zereraz> lol my bad
[06:23:08] <Boomtime> you try
[06:23:10] <zereraz> I am a complete noob
[06:23:23] <Boomtime> your first few will suck, don't give up
[06:23:26] <zereraz> trying my hand at a very complex website
[06:24:03] <zereraz> yeah I definitely won't give up, don't have other options
[06:24:34] <Boomtime> necessity is an excellent driving force
[06:24:48] <zereraz> Boomtime: yeah
[06:25:53] <zereraz> thanks allot , I'll get back to work
[08:21:49] <zereraz> how to find and increase the value in array using the index of array in mongodb
[08:22:05] <zereraz> should I reinsert the array
[08:23:53] <Boomtime> http://docs.mongodb.org/manual/reference/operator/update/positional/
[08:32:19] <zereraz> Boomtime: thanks, my array is just array of numbers
[11:34:30] <huleo> hi
[11:34:55] <huleo> I'm wondering how hard it could be to get "distance" for each result of query with $near operator
[11:35:01] <huleo> (talking geoJson here)
[11:35:08] <huleo> s/geoJson/GeoJSON
[11:35:18] <Derick> you need to use the aggregation framework for that one at the moment
[11:35:26] <Derick> hmm, perhaps 2.6 has something... one sec
[11:36:55] <Derick> nope, doesn't look like it's in 2.6
[11:37:38] <huleo> "aggregation framework", term I'm always scared of and something I never used ;)
[11:37:41] <Derick> huleo: http://derickrethans.nl/talks/mongo-osm-confoo14.pdf slide 28 and later
[11:37:47] <huleo> hmm, let me see
[11:38:13] <Derick> boo, doesn't have the original query
[11:38:15] <Derick> one sec
[11:40:41] <joker666> migration in mongodb or mongoose? i am new to node/mongo
[11:40:44] <Derick> http://docs.mongodb.org/manual/reference/operator/aggregation/geoNear/
[11:40:53] <Derick> huleo: there is an example at the bottom
[11:41:12] <Derick> http://docs.mongodb.org/manual/reference/operator/aggregation/geoNear/#example
[11:41:25] <joker666> database migration feature?
[11:42:44] <Derick> joker666: sorry, I don't understand what you're asking
[11:44:15] <joker666> Derick familiar with rails or Laravel? Database migration feature is like versions of your db, like in git, versions of your software
[11:44:27] <huleo> Derick: noob question, so basically we use .aggregate instead of .find? (+proper options for the call)
[11:44:38] <Derick> huleo: yes
[11:44:59] <Derick> joker666: in mongodb, you generally don't have to version your db...
[11:45:10] <Derick> it's pushed to the application instead
[11:45:52] <Derick> i answered a stackoverflow question on this once
[11:45:55] <joker666> how is that? lets say i'm using 10 fields in a document
[11:46:14] <joker666> later i want different fields, maybe drop a collection
[11:46:38] <joker666> sorry i messed up collections with document
[11:47:16] <joker666> (results of coming from RDBMS world)
[11:48:10] <Derick> i got to go now for a bit... lunch time
[11:48:32] <joker666> hmm Derick can you give me the srtackoverflow link?
[11:48:36] <joker666> of your answer?
[11:48:44] <Derick> couldn't find it so fast
[11:48:54] <Derick> but there are plenty of similar questions
[11:49:31] <joker666> Ok, i'm onto it... i still am noob in designing database system in nosql world
[11:49:39] <joker666> need a strong article
[11:49:41] <joker666> :)
[11:51:37] <mhh_12345678> Hello. I'm new to MongoDB and nodejs. I'm trying to run a unittest testing some mongodb stuff using nodeunit. The mongodb server port is 27017. The test just hang, it dosn't complete. Have any of you guys any experience with tesing mongodb with nodeunit?
[14:07:21] <soupsucka> hey, for some reason the mongo driver for node and mongoose are dying out when i try to batch insert a lot of data into mongodb
[14:07:46] <soupsucka> they both die without any errors or anthing after inserting about 500k records
[15:25:54] <soupsucka> whats the typical overhead in bytes for storing one record?
[15:26:49] <soupsucka> im storing 100mb of csv data (3 fields) and its using 1G of disk space :O
[15:27:13] <rspijker> soupsucka: the intiali overhead is quite large, due to pre-allocation
[15:27:31] <rspijker> percentage-wise this becomes way better later on though
[15:27:40] <dmitchell> don't forget db's don't store compactly but in a means which allows random retrieval
[15:27:51] <soupsucka> how can i check how much is actually used?
[15:28:01] <rspijker> db.collection.stats()
[15:28:14] <soupsucka> ah
[15:28:22] <soupsucka> storageSize i presume
[15:28:27] <soupsucka> 460 MB
[15:28:28] <soupsucka> lol
[15:28:37] <rspijker> correct
[15:28:42] <rspijker> I presume you are on 2.6?
[15:28:45] <soupsucka> yes
[15:28:54] <Derick> soupsucka: remember that you need to store the fieldnames for each document too
[15:28:55] <soupsucka> damn thats over 4 times the csv
[15:28:56] <rspijker> well, all of the field names have to be stored as well
[15:29:04] <rspijker> and, there is powersOf2
[15:29:07] <Derick> rspijker: beat you there ;-)
[15:29:20] <rspijker> yes, you’re quick on a friday afternoon Derick :)
[15:29:23] <soupsucka> cant it remember the field names if all of the records are the same object?
[15:29:39] <Derick> soupsucka: no, remember it's schemaless
[15:29:43] <rspijker> it’s schemaless
[15:29:48] <rspijker> damnit Derick !
[15:29:58] <soupsucka> i remember reading that you can create schemas if you want to
[15:30:21] <soupsucka> is this true?
[15:30:49] <rspijker> not in the DB itself, afaik
[15:30:57] <soupsucka> surely there must be an option to assume all objects in a collection are the same type?
[15:31:01] <rspijker> there are some ‘layers’ on top that allow youto do that kind of stuff
[15:31:30] <rspijker> soupsucka: nope. The entire idea is that if you ever want to change it, you can
[15:32:04] <soupsucka> use diffs?
[15:32:13] <soupsucka> idk
[15:32:16] <soupsucka> this is not gona work for me
[15:32:26] <rspijker> then don’t use it :)
[15:32:45] <soupsucka> i have like 1TB of disk space and 800G of data
[15:32:47] <dmitchell> compactness is not a virtue of dbs (even sql ones)
[15:33:11] <Derick> soupsucka: if you have large fieldnames, and small values, you will get a lot of extra data ...
[15:33:14] <dmitchell> quickness of CRUD is the rationale
[15:33:43] <soupsucka> Derick: 3 4-character field names
[15:34:19] <rspijker> what is the content of the fields?
[15:34:30] <soupsucka> 2 floats and 1 date
[15:37:16] <soupsucka> anybody have a suggestion for a different data store for this kind of data?
[15:38:08] <soupsucka> bbl
[15:38:26] <rspijker> I’m off. WEEKEND! :)
[15:38:57] <tscanausa> lucky
[15:58:26] <cramrod> Has anyone done stuff with NLP in node? I need help figuring out the most effective way to store and retrieve records in Mongo where they are indexed by an NLP n-gram. I dont know enough about javascript data type efficiency to optimize storage/retrieval.
[16:02:31] <cramrod> Is it very bad to use 'document' and 'record' interchangeably in this context?
[16:02:51] <cramrod> and by bad I mean inaccurate
[19:15:55] <schimmy1> I recently upgraded to mongo 2.6 and my read lock percentage has been way up, causing client timeout errors
[19:16:10] <schimmy1> has anyone had a similar experience?
[19:16:42] <schimmy1> (upgraded from 2.4)
[19:16:58] <schimmy1> currently on 2.6.4
[19:25:49] <BurtyB> schimmy1, I found I had to add a load of hints as it was picking the wrong indexes.. might be similar problem for you
[19:27:59] <schimmy1> BurtyB: and this changed from 2.4 to 2.6?
[19:28:42] <BurtyB> schimmy1, it did for me
[19:30:46] <schimmy1> ok, thank you!
[19:31:34] <joshua> This is interesting http://docs.mongodb.org/manual/reference/method/js-plan-cache/
[19:32:23] <joshua> What I am managing currently is stuck on 2.2 but I'm about to start a new job that will keep up to date with their mongo. hah
[21:02:47] <davejfranco> I have a problem using the mms, I'm receiving "low open files limit"
[21:03:01] <davejfranco> I'm using Ubuntu server 14.04
[21:23:35] <davejfranco> How I can change the files limit on ubuntu for the MMS
[21:26:45] <davejfranco> algun mardito que me quiera aclarar la duda xD
[23:21:56] <faeronsayn> Hello guys
[23:24:01] <faeronsayn> Fedora 20 mongo refuses to start ;(
[23:24:12] <joannac> faeronsayn: error message?
[23:25:21] <faeronsayn> Aug 15 19:17:33 localhost.localdomain systemd[1]: mongod.service: control proces Aug 15 19:17:33 localhost.localdomain systemd[1]: Failed to start SYSV: Mongo is -- Subject: Unit mongod.service has failed -- Defined-By: systemd
[23:26:47] <joannac> what
[23:26:53] <joannac> try starting it manually
[23:27:01] <faeronsayn> How does one start it manually?
[23:28:06] <joannac> mkdir /tmp/mongotemp; /path/to/binaries/mongod --dbpath /tmp/mongotemp --port 27017
[23:29:15] <faeronsayn> where would my binary path be?
[23:30:06] <joannac> which mongod ?
[23:31:32] <faeronsayn> https://gist.github.com/anonymous/9b0cfe5861c6bbf990dc
[23:31:43] <faeronsayn> @joannac this is the error I get when I run the command
[23:38:21] <joannac> faeronsayn: okay. did you read that message?
[23:38:28] <joannac> it says you don't have enough free space
[23:38:44] <faeronsayn> but I should have enough space... I have like 20 gigs.
[23:39:27] <joannac> maybe in your normal filesystem, but not what you have mounted on /tmp?
[23:39:44] <faeronsayn> how do I increase the amount /tmp is allowed?
[23:39:49] <faeronsayn> if I use --smallfiles
[23:39:57] <faeronsayn> what's the difference?
[23:40:27] <joannac> the files mongod tries to create are smaller
[23:40:48] <faeronsayn> this will effect my development database at all?
[23:41:12] <joannac> um, sort of
[23:41:23] <joannac> smaller files -> more files for the same amount of data
[23:41:39] <joannac> -> you're more likely to hit ulimits
[23:41:41] <faeronsayn> ugh, so how can I increase the size of tmp partition in Fedora? Would you know?
[23:41:47] <joannac> nope
[23:41:54] <joannac> in any case, let's solve the actual problem
[23:42:04] <joannac> look in /var/log/mongo/mongod.log
[23:42:52] <faeronsayn> directory doesn't exist
[23:43:01] <faeronsayn> however, mongodb does
[23:44:08] <joannac> oh
[23:44:11] <joannac> then look in there
[23:45:03] <faeronsayn> okay I get this
[23:45:35] <faeronsayn> @joannac: https://gist.github.com/anonymous/9313979bdaa2792ac940
[23:45:53] <faeronsayn> I actually don't have a pid file in there, I actually didn't even have a mongodb direcotyr
[23:46:04] <faeronsayn> so I created one, I am wondering if a mongod.pid file has some data
[23:46:42] <joannac> oh, this is a bug, i think
[23:47:03] <faeronsayn> hmmm what to do :(
[23:47:55] <faeronsayn> @joannac I can't create a file ithe
[23:48:47] <joannac> actually, no I'm thinking of something else
[23:49:12] <faeronsayn> ugh this sucks, should I try re-installing mongodb or something.
[23:49:32] <faeronsayn> I followed this guide: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/
[23:50:40] <joannac> okay, does /var/run/mongodb exist?
[23:50:56] <faeronsayn> it didn't but I created it
[23:51:05] <joannac> okay
[23:51:12] <joannac> start the mongod service again?
[23:51:19] <joannac> oh wait, you did
[23:51:25] <joannac> what are the permissions on it?
[23:51:30] <joannac> you're getting "permission denied"
[23:51:57] <faeronsayn> root and others have access files permission
[23:52:11] <joannac> write permission?
[23:52:38] <joannac> whatever user you're starting mongod as, needs to be able to write to the file
[23:52:48] <faeronsayn> there is no file, that's a directory
[23:52:55] <faeronsayn> so I can give create and delete files permission
[23:53:09] <joannac> sure
[23:53:31] <faeronsayn> @joannac I tried starting it again, and the mongod.log file doesn't seem to update.
[23:53:58] <faeronsayn> so the previous logs are still there but I am unable to start it
[23:54:54] <joannac> paste your /etc/mongod.conf
[23:54:57] <joannac> or mongodb.conf
[23:55:03] <joannac> (pastebin*)
[23:55:46] <faeronsayn> gist okay?
[23:56:21] <faeronsayn> @joannac https://gist.github.com/anonymous/ca61c37bbfe297671e91
[23:57:20] <faeronsayn> there is a mongod.lock in /var/lib/mongo
[23:57:25] <faeronsayn> should i remove the lock?
[23:57:52] <joannac> get rid of the -- in front of "smallfiles"
[23:58:36] <joannac> have you ever successfully started the mongod ?
[23:58:54] <joannac> the .lock file indicates a mongod is either still running, or an unclean shutdown
[23:59:23] <faeronsayn> @joannac I had it running before and it was fine. Btw, so after I removed the -- from infront of smallfiles it started :D
[23:59:35] <joannac> :)
[23:59:38] <joannac> excellent
[23:59:38] <faeronsayn> I also tried removing smallfiles=true completely, and it works too ;)
[23:59:46] <faeronsayn> Thank you so much, i'm very grateful :)
[23:59:55] <joannac> yeah, i suspect you just has a small filesystem mounted on /tmp