PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Monday the 10th of August, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[01:21:53] <gr33n-ion> hey guys, was wondering if there is an easier way to update a JSON object that is in a document then retireiving it in my code appending it with javascript and then re inserting it?
[01:22:12] <gr33n-ion> is there like an append function for JSON objects in the model
[01:43:22] <joannac> gr33n-ion: are you asking a mongoose question?
[02:00:11] <gr33n-ion> ohh yeah i am joannac is there a mongoose channel i was looking for one but couldn't find it
[02:00:27] <gr33n-ion> sorry must have thought this was it for some stupid reason haha
[02:04:42] <gr33n-ion> although this is a mongodb question, I have inserted a document into my collection but when i run find() on it it just error out for some reason here is what I inserted into the collection and the response
[02:05:01] <gr33n-ion> http://www.hastebin.com/ukesuyidob.coffee
[02:39:55] <joannac> gr33n-ion: you've inserted a function into your document
[02:40:20] <joannac> Date.now() gives you the current date. Date.now is a function
[03:08:14] <gr33n-ion> joannac: ahh thanks man I would have never found that hahah
[04:48:46] <milezteg> evening gents.
[05:24:15] <scrandaddy> How can I get the subdocuments in every document in a collection? i.e. all users.posts in the users collection
[05:25:13] <scrandaddy> Additionally, what kind of performance trade off is there vs keeping all posts in their own collection?
[05:35:34] <joannac> scrandaddy: db.collection.find({}, {"users.posts" : 1})
[05:35:49] <joannac> tradeoff - larger documents vs needing to do multiple queries
[05:45:11] <scrandaddy> thnx
[05:54:53] <scrandaddy> joannac: multiple queries if they're all in their own collection?
[08:03:41] <lufi> lets say I have a User and Images. a User has multiple Images. While each Image has a User. Should I put a reference from the User to his Images and vice versa? or should I put a reference in the User only?
[08:10:17] <joannac> do you need to know which user created/uploaded/whatever an image?
[08:44:40] <lufi> joannac: yes I do
[13:51:57] <christo_m> lufi: hey i read that!
[15:52:48] <cheeser> o/
[17:01:31] <MANCHUCK> we seem to be hitting a connection limit with mongodb and the php driver
[17:02:05] <MANCHUCK> when we have close to 600 connections to one replica set, we start getting timeouts and then connection errors with the message (Operation now in progress)
[17:02:19] <MANCHUCK> has anyone else seen this issue before?
[17:02:34] <cheeser> not sure about php, but the server supports up 20000 connections (maybe more by now)
[17:02:56] <MANCHUCK> yea we have it set that high and the network stack is tuned pretty well
[17:03:17] <MANCHUCK> it is almost as if php is not closing the tcp connection
[17:03:22] <deathanchor> MANCHUCK: when I got those issues, it was client driver max connection setting
[17:03:25] <deathanchor> not server side
[17:03:41] <MANCHUCK> deathanchor: let me check the ini settings for it
[17:04:44] <MANCHUCK> we dont have that setting with this driver version
[17:04:50] <MANCHUCK> https://www.irccloud.com/pastebin/YLMilm3F/
[17:04:50] <deathanchor> check the defaults
[17:07:34] <MANCHUCK> we also get read timeouts without the (Operation now in progress) in the message
[17:08:13] <deathanchor> MANCHUCK: http://www.php.net/manual/en/mongo.connecting.pools.php
[17:10:13] <deathanchor> lots of people with your issue if you google: php mongodb max connections
[17:15:26] <MANCHUCK> deathanchor: this is happening with CLI
[17:16:02] <deathanchor> mongo shell?
[17:16:17] <MANCHUCK> we are running a php script using the CLI
[18:37:25] <MANCHUCK> deathanchor: connection pooling is not going to fix anything for us. Our driver doesn't support it any more
[18:37:34] <MANCHUCK> we are on 1.6.10 of the driver
[18:41:42] <deathanchor> don't know what to tell ya
[18:41:52] <deathanchor> I use python mostly, PHP sparingly
[18:49:32] <cheeser> time to upgrade!
[18:52:43] <cheeser> hrm. 1.6 *is* the latest php driver it would seem.
[18:53:31] <dijack> .
[18:53:33] <dijack> question folks
[18:53:43] <dijack> I'm trying to setup a mongo node
[18:53:57] <dijack> and I'm getting this -> Found 1 instances of localhost.localdomain in replica set configuration, something went wrong, exiting
[18:53:59] <dijack> any ideas?
[18:54:37] <deathanchor> is one of your hosts "localhost.localdomain"?
[18:55:16] <dijack> yes it is running
[18:55:17] <dijack> mongod
[18:55:46] <dijack> when I do this -> > rs.status() { "startupStatus" : 3, "info" : "run rs.initiate(...) if not yet done for the set", "ok" : 0, "errmsg" : "can't get local.system.replset config from self or any seed (EMPTYCONFIG)
[20:12:41] <deathanchor> if I have a doc : { _id : abc, some : [ { thing: "here" } ] }; how do I do a $set to change it to thing : "yay"?
[20:32:43] <Siamaster> Hi, When I do service mongod stop , it says OK, but when i do service mongod status, it says running
[20:32:48] <Siamaster> also start fails
[20:32:55] <Siamaster> and I don't know where to find logs
[20:34:52] <cheeser> /var/log ?
[20:34:59] <Siamaster> it's empty
[20:35:29] <cheeser> check /etc/mongod.conf
[20:35:36] <cheeser> it should have a logPath for you
[21:19:12] <akoustik> can anyone point me to some common causes of getting a replica set into a state where none of the members are primary? i already tried this to get one of the running members to assume primary role, but didn't figure it out: http://docs.mongodb.org/manual/tutorial/force-member-to-be-primary/
[21:20:38] <zero___> Hey guys, we've built a platform for doctors to track their patients. We want to be able to give out demo accounts, and we have the functionality to create new doctor accounts, but we want to populate those accounts with some example patients and data. We can do that manually by adding new patients, creating data and then fudging dates on the backend, but is there an easy way of doing this using a kind of template or other method?
[21:25:12] <joannac> akoustik: loss of majority
[21:26:12] <joannac> zero___: sounds like an application layer problem to me
[21:28:23] <zero___> joannac: I have example data, but in order to replicate it for another account I would need to ensure all the IDs were unique with the right relationships, and associate them instead with a different user's account.... i could imagine writing a script to generate ids and substitute them in to json templates and then inject it in to mongodb, but it seems like a lot of work - just wondering if there's anything that might save us tim
[22:42:05] <pyCasso> greetings..before RDBMS and NoSQL systems how was data stored?
[22:45:51] <joannac> in flat files
[22:50:34] <pyCasso> joannac: what do you think was the cause to innovate from flat files?
[22:54:03] <joannac> pyCasso: this sounds like a homework assignment
[22:54:16] <joannac> care to provide some context?
[22:54:30] <pyCasso> haha. it's not
[22:55:20] <pyCasso> I have experience with RDBMS and MongoDB. but I like the idea of flat files and have built a python framework using such
[22:56:00] <pyCasso> however, I never knew it was once the standard until today
[22:57:03] <pyCasso> the python app i created is for small business sites ( blogs, and shopping carts)
[22:57:41] <pyCasso> I built 1 site using the framework www.uniforhair.com
[22:58:08] <pyCasso> and currently building a backend for editing the flat files.
[22:58:53] <pyCasso> My background is frontend UI/UX..Im curious why flat files aren't used more often
[23:01:43] <pyCasso> so far from internet research, Flat files can limit the amount of editors on a single file at one time and relational aspect is another ( small in my opinion )
[23:01:54] <joannac> http://stackoverflow.com/questions/2356851/database-vs-flat-files