PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 7th of January, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[06:10:21] <Ecugetons> I'm looking for a JSON database for a PaaS kind of service. I need one database to handle possibly 1000s of "clients" each with their own db/collection. I was wondering if it is safe in mongo to give each one a collection and let it run anything (collection.query etc) on it, or can it possibly access other collections?
[06:18:50] <ron> Ecugetons: you should read about mongodb's security configuration, but imho, you shouldn't rely on it but have some kind of an additional layer in front of it. not sure how performant it would be with 1000s of clients too, but given the first point, I don't see a reason you should need it.
[06:19:28] <ron> also, keep in mind that mongodb does *not* store JSON but rather BSON. they are represented as JSON when you view them, but that's not how they are stored internally.
[06:22:25] <Ecugetons> "I don't see a reason you should need it."
[06:22:48] <Ecugetons> what do you mean exactly
[06:25:12] <jinmatt> Hey, is it a best practice to use mongodb or any db for storing feature switching config variables? or just use constants in a config file?
[06:49:00] <ron> Ecugetons: if you have an extra layer before mongodb, then you can control the access using that without the need for a collection per user.
[07:34:04] <newbsduser> hello, i cant start mongodb instance, logs here: http://pastebin.com/twXH2fkP can you check it please?
[07:37:34] <ppeterma1n> newbsduser: have you tried to do as it tells you?
[07:37:36] <ppeterma1n> enable journaling?
[07:39:18] <newbsduser> when should i enable journaling?
[07:39:40] <newbsduser> i have journal files
[07:39:48] <newbsduser> it s already enabled before unclean shutdown
[07:40:27] <ppeterma1n> Tue Jan 7 09:25:02.458 [initandlisten] exception in initAndListen: 13597 can't start without --journal enabled when journal/ files are present, terminating
[07:40:31] <ppeterma1n> thats when you start your repair
[07:40:50] <ppeterma1n> and its shuting down because of that
[09:59:33] <WhereIsMySpoon> Im having trouble reconciling the idea of mongodb to making classes with them..mongo is schema-less, which means there is no strict structure. This means that I cannot be sure that all objects in a collection will have the same structure
[09:59:55] <ron> and?
[09:59:58] <WhereIsMySpoon> I guess my question is..how do people go about dealing with this and what is the normal way to go about architecting this sort of thing with mongo
[10:00:33] <WhereIsMySpoon> im a bit puzzled as to how putting together a strict class system and mongo's system works
[10:00:33] <ron> you know you're controlling the data, right? no little gnomes going in and altering the data for you.
[10:00:38] <WhereIsMySpoon> i know that
[10:00:59] <WhereIsMySpoon> but i would also like ot make sure the system is robust
[10:01:07] <ron> store strict classes in a collection, and you'll have only strict classes in mongo. it's that simple.
[10:03:19] <WhereIsMySpoon> ron: ok the specific thing im dealing with here is whether to store a list of user ids as a single object in a collection as a list of ids or as a list of user objects in the collection
[10:03:24] <WhereIsMySpoon> in sql its a no brainer, its a list of user rows
[10:03:38] <WhereIsMySpoon> in mongo im not sure
[10:03:40] <ron> there's no absolute answer. it depends on your needs. most likely a list of user objects though.
[10:03:47] <WhereIsMySpoon> yea..it seems a bit weird to me to use a list of user ids in a single object as then why am I using a colleciton
[10:03:48] <WhereIsMySpoon> seems like that object itself is a collection
[10:03:50] <WhereIsMySpoon> which defeats the purpose and feels weird
[10:04:03] <WhereIsMySpoon> but again it would be nice to not have a load of objects
[10:04:13] <WhereIsMySpoon> *shrug*
[10:04:50] <ron> what
[10:04:51] <ron> I don't follow your logic.
[10:04:59] <WhereIsMySpoon> never mind
[10:05:03] <WhereIsMySpoon> ill go with a list of user objects
[10:07:41] <WhereIsMySpoon> thanks
[10:11:38] <Nodex> I think he's confused what a collection is tbh
[10:12:10] <ron> possibly
[11:29:56] <Derick> quiet here this morning :-)
[11:30:02] <Derick> trakowski77: any luck?
[11:30:29] <Nodex> quiet is a good thing, means ther is lots of innovation :P
[11:35:55] <ppetermann> "Silence is a source of great strength"
[11:36:14] <Derick> "Most quotes are made up"
[11:36:46] <ppetermann> thats why i didn't name an author
[11:36:50] <ppetermann> happy new year to you
[11:36:55] <Derick> you too :-)
[11:37:03] <Derick> anything awesome planned?
[11:37:29] <ppetermann> whisky tasting i believe next weekend, global game jam the week after
[11:37:40] <ppetermann> or the other way around
[11:37:53] <Derick> whoop
[11:38:27] <ppetermann> so two good weekends ahead =)
[11:39:39] <ppetermann> also i just ordered new whisky, since i'm running low on my stash
[11:39:46] <ppetermann> somehow christmas time killed most bottles
[11:39:52] <Derick> what did you order? (and how large is the stash? :-)
[11:41:11] <ppetermann> Caol Ila Distillers Edition 2001/2013, and Talisker Distillers Edition 2002/2013
[11:42:06] <ppetermann> and my stash is down to a sad rest of a Signatory filling of Caol Ila (17 years) and half a bottle Talisker Storm
[11:42:24] <Derick> ok!
[11:42:26] <Derick> disaster
[11:42:31] <ppetermann> (which in my opinion is one of the best budget whiskies)
[11:42:52] <Derick> you seem to like peaty
[11:43:03] <ppetermann> i didn't when i started, but it grew on me
[11:44:03] <ppetermann> also all of 'em are quite moderate compared to octomore or some of the laphroaig i tried
[11:44:27] <ppetermann> and i guess when its getting warmer again i might chose differently as well =)
[11:44:43] <Derick> hehe, fair point
[11:44:55] <ppetermann> last summer i had a really nice signatory filling of a ben nevis
[11:45:03] <Derick> I'm having the problem of running out of shelf space
[11:45:59] <ppetermann> i'm not collecting, i'm just ordering between 2 and 3 bottles (+ some bottles for some friends if they join in), and order the next when those are empty
[11:46:24] <ppetermann> how many of your bottles are open?
[11:46:50] <Nodex> Derick : horizontally scale the shelves :P
[11:50:11] <Derick> ppetermann: 22
[11:50:18] <Derick> (all, but one)
[11:50:24] <Derick> Nodex: hehe :-)
[11:53:56] <ppetermann> Derick: are you sure you will be able to drink all before the air takes its toll?
[11:54:25] <ppetermann> also, its quite funny, i still remember you not drinking etc. when we first met =)
[11:56:14] <Derick> ppetermann: sure
[11:56:19] <Derick> i have friends :)
[11:58:38] <ppetermann> just wondering, co-worker of mine has alot of open bottles as well, and he just bought some co2-thing that you can use to re-seal the bottles
[11:59:19] <Derick> not sure how much effect that has really...
[12:00:35] <ppetermann> tbh, my bottles don't live long enough for oxidation to make much of a difference, but i had a bottle port wine turn on me last year
[12:01:00] <Derick> yeah, wine and port is much more sensitive to this
[12:01:21] <ppetermann> well, less alcohol and more sugar =)
[12:05:49] <Derick> yup
[12:05:57] <Derick> and not so tasty
[12:08:03] <ppetermann> i can enjoy a good wine, i mean thats what i grew up with
[14:50:06] <wangxh> Is there a way to add one mongodb to multi replSet?
[14:53:27] <Derick> wangxh: no
[14:59:06] <wangxh> oh
[15:04:50] <JPMateo> Hi anybody here?
[16:02:14] <treaves> I'm trying to determine what "scoped connection to 127.0.0.1:27017 not being returned to the pool" means.
[16:02:47] <treaves> I see the comment in connpool.cpp, but, it doesn't make any sense.
[16:03:28] <treaves> "/* see done() comments above for why we log this line */"
[16:03:32] <treaves> Which is "The pool takes care of deleting the failed connection - this will also trigger disposal of older connections in the pool"
[16:03:33] <treaves> But, the connection is not failed.
[16:03:33] <treaves> So I do not understand the relevence .
[16:21:13] <metasansana> trying to compile mongo on ubuntu12.04 and I get error : "target has GLIBC_2.4 dependencies!"
[16:21:14] <ron> why?
[16:21:16] <metasansana> I want ssl support.
[16:21:34] <ron> why?
[16:22:13] <ron> and does that mean you made code modifications to mongodb?
[16:22:23] <metasansana> nope
[16:22:37] <ron> mhmm
[16:22:39] <Derick> ron: our distribution doesn't have SSL compiled in, but our source code distribution does
[16:22:39] <metasansana> I just followed the docs on compiling
[16:22:47] <ron> Derick: interesting.
[16:23:10] <metasansana> Derick, the source from apt-get source?
[16:23:19] <Derick> metasansana: no, not that one I think
[16:23:43] <Derick> metasansana: get the source from mongodb.com/downloads: http://fastdl.mongodb.org/src/mongodb-src-r2.4.8.tar.gz
[16:23:54] <metasansana> yes I did
[16:24:54] <Derick> hmm
[16:25:09] <Derick> I don't have ubuntu here now to test and try
[16:25:18] <metasansana> what's wrong with glibc2.4 btw?
[16:25:26] <Derick> yeah, nothing I think
[16:26:08] <metasansana> https://github.com/mongodb/mongo/blob/master/src/mongo/SConscript
[16:26:14] <metasansana> ^I see the message there
[16:27:04] <Derick> metasansana: I would suggest writing to the mongodb-dev google group
[16:27:16] <metasansana> ok, thanks
[18:02:17] <NaN> hi there
[18:03:18] <NaN> I just installed server and client, it is normal to take to much time the firt time I do service start? (fedora)
[18:03:26] <NaN> *is it
[18:04:38] <TehShrike|Work> I'm using the Java API (an oldish version, 2.6.5). If I get back a document containing a list, what is the proper way to turn it into a Set/List/Collection? Can I just cast it ala (BasicBSONList)obj.get("my_list") ?
[18:15:03] <maginot> Hello. Can anyone help me with where can I found more information on how to configure mongodb.conf for a configuration with replicaSet and shard?
[18:20:35] <Nodex> maginot : try the docs on the mongodb website, they have a lot of info
[18:24:39] <cheeser> i don't think anything in mongodb.conf affects either of those, really.
[19:14:13] <maginot> okay, I'm digging inside mongo's website, and I'm having a lot of information and doubts, maybe I should adopt a good book to get a more didactic approach on how to implement a trustful cluster on my production environment, I'm open for suggestion if you have any. Thanks
[19:18:15] <NaN_> any help with this error? > [initandlisten] exception in initAndListen: 10310 Unable to lock file: /var/lib/mongo/mongod.lock. Is a mongod instance already running?, terminating
[19:18:32] <NaN_> mongo is not running and it doesn't let me start
[19:25:45] <cheeser> you can safely delete that file then
[19:27:38] <NaN_> cheeser: I already deleted the file, the problem continues
[19:29:48] <cheeser> that's weird
[19:29:55] <cheeser> are you trying to start it as root?
[19:32:08] <NaN_> cheeser: yes as a root
[19:50:37] <mrpoundsign> I'm getting a strange error trying to use upsert on a 2dsphere index... Can't extract geo keys from object, malformed geometry?:{ type: "Point", coordinates: [ 180, 91 ] } -- seems to haveppen if X < 180 or Y > 90
[19:53:08] <mrpoundsign> is that the right index for Point? The docs were pretty confusing on this. haha
[19:54:23] <mrpoundsign> I was thinking about just using the 2d index, because it is just points on a plane. But I was frightened by it being labeled as "legacy"
[19:56:49] <ranman> mrpoundsign: 2dsphere indexes are modeled on the earth
[19:56:59] <ranman> 2d indexes are more coordinate plane oriented
[19:57:52] <ranman> but the 2dsphere index can also support the old coordinate pairs unless I'm mistaken
[19:58:22] <ranman> so data that you would have in the 2d index "should" work the same? can anyone confirm that?
[19:59:34] <mrpoundsign> that was my understanding, but I can't seem to upsert { type: "Point", coordinates: [ 181, 88 ] }
[20:00:30] <mrpoundsign> actually, it seems to have the same problem in the negative. hmm
[20:03:10] <mrpoundsign> would there be a better way to do this for a flat plane of x,y coords that I don't want to have a limit on and that I can still query as a box?
[20:04:00] <mrpoundsign> or should I multiply by some factor to make it fractional?
[20:05:43] <ranman> I think you might be able to just use a 2d index and get what you want
[20:05:46] <ranman> instead of a 2dsphere index
[20:05:50] <ranman> just experimenting now
[20:06:17] <mrpoundsign> aah. if it will help to understand what I am trying to achieve: http://mrpoundsign.com:9000/
[20:06:42] <mrpoundsign> I need the ability to query a box to get movements and send the entire list of points from there.
[20:07:37] <ranman> http://docs.mongodb.org/manual/core/2d/
[20:08:11] <ranman> yeah you want 2d not 2dsphere I think
[20:09:49] <mrpoundsign> "To index on both legacy coordinate pairs and GeoJSON objects, use a 2dsphere index." was what confused me.
[20:09:59] <ranman> yeah I'm going to correct that actually
[20:11:00] <ranman> http://docs.mongodb.org/manual/applications/geospatial-indexes/#flat
[20:12:58] <mrpoundsign> hmm
[20:14:04] <ranman> seeing as http://docs.mongodb.org/manual/core/2d/ this page is the first result for mongodb geoindex I think we should update that to have another bullet underneath use a 2d index if
[20:14:37] <mrpoundsign> * if you're creating a really silly website and trying too hard
[20:15:01] <ranman> :D
[20:15:16] <mrpoundsign> is it still going to have the numerical constraints, though? I guess I'll find out haha
[20:16:27] <ranman> point not in interval of [ -180, 180 ]
[20:16:29] <ranman> yup
[20:16:30] <ranman> :/
[20:16:39] <ranman> grrr
[20:30:35] <mrpoundsign> meh I can just calculate it out before sending it to the DB and back out when I load it again.
[21:15:19] <mrpoundsign> ranman, thanks so much for your help. I think I have it where I want it now.
[21:15:32] <ranman> mrpoundsign, that's great!
[21:15:34] <ranman> np
[22:23:47] <OliverJAsh> can anyone share their thoughts on how best to implement paging over mongodb? http://stackoverflow.com/questions/20960815/range-query-for-mongodb-pagination/20960868
[22:25:11] <cheeser> skip+limit
[22:32:57] <OliverJAsh> cheeser: apparently it's not a good idea to use that
[22:33:08] <OliverJAsh> because it has to store all the skipped documents in memory, or something?
[22:33:33] <cheeser> um. no.
[22:33:41] <cheeser> it doesn't.
[22:39:13] <OliverJAsh> cheeser: http://docs.mongodb.org/manual/reference/method/cursor.skip/
[22:39:22] <OliverJAsh> "Consider using range-based pagination for these kinds of tasks."
[23:14:07] <phuh> how can i take advantage of digitalocean's cheap $5 nodes and horizontally scale mongodb automatically?
[23:44:24] <phuh> Can mongodb work well on lots of digitalocean's $5 512mb RAM 40GB SSD instances?
[23:50:28] <Derick> phuh: not nearly enough memory I would say
[23:50:54] <phuh> Derick: hmm what would be the minimum recommended memory in this config?
[23:52:53] <Derick> depends on what you want to do
[23:53:05] <Derick> I run it (very lightly) on my 1.5GB VPS
[23:53:15] <Derick> but... yeah, not much load or usage on it
[23:54:05] <LouisT> i had it running quite well on a linode when they were 512MB