[00:05:59] <SpNg> I'm working on a node.js app, and I have been trying to decide if it's better to open a new connection for every Mongo query, or is it better to maintain a single open connection and run all request through it?
[00:14:41] <timeturner> the connection is an async worker basically
[00:15:29] <timeturner> so even if you open more than one connection and shell out multiple commands at one time the mongod will still process at the same rate
[00:17:23] <SpNg> Ok. Well the good news is that's how it has been engineered right now
[00:18:15] <SpNg> this all came up after the app lost connection with the mongod server after running for a long time
[00:46:22] <sander__> Do anyone have a geospartial guide to mongodb?
[03:03:02] <bmercer> how can I change the formatting of all the strings in my table?
[03:03:18] <bmercer> I've got a column price that I want to change from 1234 to 12.34
[03:04:23] <TkTech> A script and a whole lot of $set's
[03:07:27] <bmercer> I just changed them from an int to a string :)
[03:35:32] <mikesm> alot of examples im seeing are using db.collection('name', {safe:true} .. I see that the option 'safe' is now deprecated. what do we use instead?
[03:42:36] <TkTech> mikesm: Say you're using pymongo, http://api.mongodb.org/python/current/api/pymongo/collection.html#pymongo.collection.Collection.save
[03:42:48] <TkTech> mikesm: Note it recommends using "w" in the safe deprecation note.
[04:40:04] <MacWinner> facebook returns a multidimensional array for a user.. i'm totally new to mongodb, but is it totally bad if i just convert that array into a JSON string and store it into mongodb?
[04:40:39] <MacWinner> like with a php json_encode function.. just shove the return value into mongodb if it's not null
[07:02:00] <key2> 3. Saving Here's how you save a document to MongoDB: db.scores.save({a: 99}); This says, "save the document '{a: 99}' to the 'scores' collection." Go ahead and try it. Then, to see if the document was saved, try db.scores.find(); Once you've tried this, type 'next'.
[07:14:47] <key2> btw I added quotes like in your example and I'm still getting the same
[07:48:09] <joshua> Hey are there any smart people awake
[07:48:54] <joshua> I am just wondering when the balancer is still balancing will I keep seeing "too many chunks to print, use verbose if you want to force print" or is it going to display like that forever
[07:58:22] <joshua> Ah, figured out verbose mode sh.status({verbose:true})
[08:40:23] <Zelest> I have a replicaset and 3 servers running 2.0.6 .. is it safe/supported to simply upgrade from 2.0.6 to 2.2.2, each node at the time?
[08:40:34] <Zelest> or what is the best practice way of upgrading a production server?
[09:11:24] <joshua> Zelest: I upgraded our cluster from 2.0 to 2.2 without any issues.
[09:12:17] <ron> NodeX: dude, I have an excuse. I'm not a native speaker ;)
[09:13:11] <joshua> I converted ext3 to ext4 without reformatting and didn't lose any data. This is good news for our production environment when I get around to doing it on all the rest of the machines
[09:28:11] <NodeX> dawra : no, you will have to loop it
[09:28:32] <royh> is there a way to limit the resources a query can use? as in cpu time. I'm going to set up a replicaset for a number of different services and I don't want one query to take down the whole thing.
[10:07:58] <joshua> Just wondering cause if you have support they run through a health check and help advise you on how to set it up etc. for best practice.
[10:08:17] <royh> joshua: got a link. might be interested in that :)
[10:56:42] <joshua> collections exist inside a database
[10:57:02] <scoutz> i have a replica setup with a primary,secondary and an arbiter however when i take down one of the sets it doesnt set a new master, do i need a mongos to do this?
[10:57:10] <chrisq> joshua: yes, that much i figured out, but is there a reason not to just put it all in one database?
[10:57:56] <joshua> I think the reason they suggested against it was if you plan on sharding
[10:58:00] <chrisq> like can you do joins between collection in the same database, but not between collection in different databases?
[10:58:41] <kali> scoutz: nope, it should work with these 3
[10:58:55] <kali> scoutz: mongos is only required if you need to shard
[10:59:27] <wayland> algernon: databases/mongodb-devel have been removed from the ports collection, i was trying to install it form source using "scons mongoclient" but i'm not sure how only to install the client libraries without building the whole thing
[10:59:35] <joshua> chrisq: I just had it explained to me like a week ago and I forget already the logic behind it
[11:00:09] <ron> wayland: I'd suggest asking in the mailing list/forums.
[11:07:07] <duraid> nodex: what I mean by 'procedural document' is a way to have some code act as if it is a large number of documents
[11:07:19] <duraid> without actually *adding* those documents to the DB
[11:07:32] <NodeX> duraid : I dont know what that means sorry
[11:07:48] <chrisq> NodeX: http://docs.mongodb.org/manual/applications/database-references/ this explains it better, and seems to indicate that you can in fact do references between documents
[11:07:59] <duraid> nodex: *ding* i know, an example would help
[11:08:13] <duraid> nodex: this is a pointless simple example, but should explain what I mean
[11:08:28] <NodeX> chrisq : in your scenario an rdbms with joins is a bad idea.... an album NEVER changes once sold so I would store the album and the songs in the abum
[11:10:42] <chrisq> NodeX: ok, thanks, in the music business all songs are tied to "releases" which might have 1 or more songs, in this case you'd have only one collection "releases" with all songs added to them?
[11:11:00] <NodeX> it would be an albums collection per your example
[11:11:05] <chrisq> all songs are probably included in quite a few releases though
[11:11:21] <chrisq> still thats an overhead we could deal with
[11:11:24] <NodeX> what is quieried more ... albums or songs?
[12:08:15] <kali> i'm not aware of such an issue, and given the scenarios used as examples (transcontinental RS) i would assume there is not such a limitation
[12:08:40] <kali> what i do know is, the machines clocks needs to be sync to a ntp server
[16:33:52] <JakePee> i'm looking to support queries { 'user_id' : val, 'fields.name': val}
[16:34:03] <JakePee> and { 'user_id' : val, 'fields.age': val}
[16:34:24] <JakePee> as well as a few others in the 'fields' subdocument
[16:38:50] <JakePee> the issue is that if i try doing db.coll.ensureIndex({'user_id' : 1, 'fields.name':1, 'fields.age': 1}), the query db.coll.find({'user_id':val, 'fields.age'}) doesn't get caught
[16:40:59] <JakePee> and if i do db.coll.ensureIndex({ 'user_id' : 1, 'http://fields.name/': 1}) and db.coll.ensureIndex({ 'user_id' : 1, 'fields.age': 1}), the 'user_id' field is replicated for each index
[16:41:46] <JakePee> and if i do db.coll.ensureIndex({ 'user_id' : 1, 'fields.name' : 1}) and db.coll.ensureIndex({ 'user_id' : 1, 'fields.age': 1}), the 'user_id' field is replicated for each index
[16:43:00] <elux> ive been running mongodb for a little while, and its been fine.. but for whatever reason i no longer can run the mongo shell.. this is what happens: https://gist.github.com/cd1b81db44d4da0bf332
[16:43:10] <elux> any ideas..? did some dependent library get overridden..?
[16:49:01] <elux> pretty brutal i cant even open the mongo shell lol
[16:59:59] <NodeX> pretty sure you have to compile V8 support in
[17:00:24] <NodeX> try the latest spidermonkey libs
[17:00:25] <elux> i just installed from the package manager (yum) .. the server has been working fine... and im pretty sure the client did at one point too
[17:02:53] <elux> im going to compile mongo myself..
[17:09:00] <JakePee> sorry, wasn't articulating well earlier
[17:15:39] <elux> hrmm lots of mongodb-src-r2.2.2/src/third_party/boost/boost/date_time/gregorian/greg_day.hpp:20: undefined reference to `std::out_of_range::~out_of_range()'
[17:15:40] <elux> build/linux2/normal/third_party/boost/libs/thread/src/pthread/thread.o:/opt/mongodb-src-r2.2.2/src/third_party/boost/boost/date_time/gregorian/greg_day.hpp:20: more undefined references to `std::out_of_range::~out_of_range()' follow
[17:15:44] <elux> and then build failure.. any suggestions?
[17:17:16] <kali> elux: mismatching boost version s?
[17:17:39] <elux> cool.. ill try to remove any boost packages i have on my system
[19:20:00] <ekristen> anyone familiar with cloud foundry and how it implements mongodb?
[19:20:40] <NodeX> hopefuly the engineers @ cloud foundry :P
[19:28:59] <ehershey> want to play with cloud foundry
[20:45:31] <starburst> I have a mongo database called mongodb_production and a database called mongodb_development... what's the best way to copy contents from one DB to another? They exist on different servers (and networks). I can only scp/sftp between the two servers
[20:46:29] <starburst> for our mysql db we use mysqldump/mysql < blah.sql so I was wondering if there was an equivalent method.