PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 1st of June, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[02:26:43] <ilgooz> Hi! anyone?
[02:28:57] <Oku71> hi
[02:29:06] <ilgooz> hi guys i have question about my long lived connection
[02:29:47] <ilgooz> can i get some help please let me explain
[02:30:18] <ilgooz> i'm using sailsjs from nodejs native mongodb adab
[02:30:46] <ilgooz> i am building a rest api with that
[02:31:20] <ilgooz> so the problem is if anyone doesnt fetch a query for a long time
[02:31:22] <ilgooz> the connection is drops
[02:31:46] <ilgooz> Error: failed to connect to [localhost:27017]
[02:32:01] <ilgooz> but i'm using keepAlive fatures
[02:32:13] <ilgooz> also auto_reconenct
[02:32:25] <ilgooz> so what is your suggestion?
[02:41:34] <hahuang65> is mongorestore and mongoimport idempotent?
[02:44:00] <ilgooz> Idk actualy, All I know is mongosb running
[02:48:25] <ilgooz> if some one doesnt fetch any query for a long time and if does after that i'm getting the error
[02:48:48] <ilgooz> i thought keepAlive works with mongoose, mongoskin...
[02:49:11] <ilgooz> but sails!? what I'm i doing wrong :/
[02:53:10] <ilgooz> please some hulp guys :)
[03:15:30] <ilgooz> anyone?
[03:18:58] <thevdude> Is there any way to make it error if the query doesn't return a result in node.js using the mongodb-driver?
[03:21:56] <thevdude> or should I just check for null?
[03:55:34] <Warfront1_> How do i search for a feild name generated by javascript not hard coded
[03:56:55] <redsand_> that doesn't make sense
[03:57:16] <Warfront1_> I worded that wrong
[03:57:42] <Warfront1_> var myCursor = DataCollection.find({ _goalId: id });
[03:57:46] <Warfront1_> I iteratre over that
[03:57:53] <Warfront1_> but the field i am looking for is dynamic
[04:06:59] <ilgooz> its easy
[04:07:10] <ilgooz> var obj = {}
[04:07:24] <ilgooz> obj['yourSynamicField'] = 'value'
[04:07:30] <ilgooz> find(obj)
[04:09:42] <Warfront1_> im actually trying to access it from within a foreach
[04:09:57] <Warfront1_> so i have id."I want my dynamic variable here"
[04:10:15] <Warfront1_> ValueforDate = id._getName;
[04:10:22] <Warfront1_> for instance getName will change
[04:11:14] <ilgooz> you should do it like that id[_getname]
[04:12:19] <Warfront1_> ValueforDate =id[_dynamicField];
[04:12:20] <Warfront1_> ?
[04:12:50] <ilgooz> id[_dynamicField] = ValueForDate
[04:17:13] <Warfront1_> Worked great
[04:17:22] <Warfront1_> Thanks for the help.
[04:36:15] <ilgooz> np
[05:21:39] <devdvd> Hi All, Have a quick question about mongo in relation to arbiters. If you have 2 arbiters in a replset, and one goes down, the other just takes over right? Also, as verification, if the server you expect to be primary is listed as primary then everything should be good right?
[05:21:53] <devdvd> thats 2 questions sorry, it was 1 in my head
[05:23:43] <redsand_> don't do arbiters
[05:24:03] <devdvd> oh?
[05:24:04] <redsand_> personal experiance from doing it in production
[05:24:19] <devdvd> mind if i ask what problems you faced?
[05:24:26] <redsand_> we only did arbiters if < 3 nodes, and we'll never do < 3 nodes again
[05:24:30] <redsand_> biggest issue was replication lag
[05:24:53] <redsand_> and then, if a box goes down and needs help for "whatever" reason, back to major replication lag
[05:25:03] <devdvd> interesting
[05:25:09] <redsand_> we mastered parallel rsync due to mongo goofyness
[05:25:32] <redsand_> seriously devdvd , this advice is worth at least a million dollars
[05:25:51] <devdvd> redsand_: thank you :)
[05:26:06] <devdvd> I'm happy not to use arbiters,
[05:26:13] <devdvd> one less point of failure imo
[05:26:28] <redsand_> yeah
[05:26:29] <devdvd> i was under the impression you had to for replication to work
[05:26:37] <redsand_> yes, if youre < 2
[05:26:39] <redsand_> or odd
[05:26:44] <redsand_> erm sry, < 3
[05:26:47] <redsand_> or odd number
[05:26:55] <devdvd> only gonna have 3
[05:27:06] <redsand_> if odd, fine, arbiter is okay, but don't run 2 nodes + 1 arbiter, it's stupid
[05:27:32] <redsand_> well, coming from a write-heavy app
[05:27:43] <redsand_> read-heavy is like heaven, so idk how that experience is
[05:29:32] <devdvd> cool
[05:29:40] <devdvd> thanks for the advise :)
[05:34:06] <ilgooz> i got a question too
[05:34:22] <ilgooz> i'am trying to deal with it for a while
[05:35:03] <ilgooz> i think my mongodb connection is drops after a few minutes if no one fetch any queries
[05:35:12] <ilgooz> i am using sails-mongo adaptor
[05:35:31] <ilgooz> have you any idea about that?
[05:35:49] <ilgooz> i tired replicaset keepalive 1
[05:42:22] <redsand_> ilgooz: no experience sorry.
[05:42:43] <redsand_> i can say that my driver/adapter choice directly affects my experience
[05:43:07] <ilgooz> i just cant have a long term connection
[05:43:15] <ilgooz> :/
[05:43:43] <redsand_> story of my life
[05:44:08] <redsand_> i had that issue, switched to my own protcol over https to handle inconsistencies
[05:45:37] <ilgooz> one day i am gonna sucide because of programming
[05:45:48] <ilgooz> that works with mongoose options.server.socketOptions = options.replset.socketOptions = { keepAlive: 1 };
[05:47:41] <redsand_> implement retreis
[05:48:44] <ilgooz> but i love programming, happy now :)
[05:48:49] <ilgooz> i have no idea it works!
[05:48:50] <whomp> i moved my mongo db dir from /var/... to ~/mongodb, but when i start mongodb with the new location, it tells me "Starting database: mongod failed!"
[05:49:12] <ilgooz> http://www.youtube.com/watch?v=KVN_0qvuhhw
[05:49:24] <whomp> what might be the issue? where could i find more info about the failure?
[05:52:52] <redsand_> check permissions
[05:52:59] <redsand_> also, strace is your friend
[05:58:16] <whomp> redsand_, thx it was permissions :)
[05:59:35] <redsand_> np
[10:22:15] <yaddaallover> Folks i'm following along the M101J course in the MongoDB University. When I'm attempting the MAVEN install I hit a BUILD FAILURE and hope someone might be able to assist me fix. http://pastebin.com/jK9gQJAQ
[14:10:04] <Ephexeve> Hey guys, anyone knows how can I insert only is doesn't exist in mongoengine?
[14:24:34] <cheeser> with an upsert
[14:31:06] <Ephexeve> cheeser: won't upsert update if alreay exists?
[14:37:01] <cheeser> yes
[14:37:36] <cheeser> alternately, you could impose a unique constraint on some field and just try the insert and ignore the duplicate key exception
[15:35:57] <G1eb> hiya, quick question on aggregation pipeline, there are some fields I don't match or group on but would like having in the result set
[15:36:16] <G1eb> however if I just add them to the group stage I get this: "exception: the group aggregate field 'source' must be defined as an expression inside an object",
[15:37:50] <G1eb> I can use $concat with an empty string but thats just a workaround, is there something obvious I'm missing here?
[15:54:10] <Reflow> wefawe
[15:54:29] <cheeser> gesundheit
[16:42:08] <Reflow> how come when i du db.collection.runCommand("text", { search : "something here" }) it brings every thing in the collection with something
[16:42:10] <Reflow> but not containing here
[16:42:12] <Reflow> it supposed to be both
[20:06:03] <geardev> I'm absolutely struggling to get this to work
[20:06:05] <geardev> https://pastee.org/cfr7w
[20:06:13] <geardev> would anyone be willing to help me?
[21:08:51] <cheeser> geardev: paste returns a 404
[21:11:21] <geardev> cheeser: oops! it expired, let me change that, and repaste
[21:12:45] <geardev> cheeser: https://pastee.org/bmgk5
[21:13:40] <cheeser> well, i'm not a js guy but i'll do my best. what's the problem?
[21:13:44] <geardev> the promisifying bit came from http://stackoverflow.com/questions/23771853/how-can-i-promisify-the-mongodb-native-javascript-driver-using-bluebird
[21:14:06] <geardev> this is the error: https://pastee.org/553mc
[21:14:10] <cheeser> ah, yeah i'm gonna be useless on that, i'm afraid.
[21:14:44] <geardev> I believe it has something to do with toArray within scores.coffee not retuning a promise
[21:24:21] <dman777_alter> starting mongodb in shell with mongoose. Shouldn't the db.modelSchemas be showing my schemas that I made?
[21:24:59] <dman777_alter> also shows models to be empty
[21:25:03] <dman777_alter> {}
[21:25:08] <dman777_alter> db.models that is
[22:43:15] <micovery> hi, looking for help with the node.js mongodb native driver ... is this the right place to ask?