PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 27th of October, 2013

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:21:16] <hno> use ...
[00:30:01] <bdonnahue> i am looking intomulti master replication. does anyone have experience with this?
[00:34:19] <bdonnahue> anyone alive in here?
[06:48:48] <mnek84> hello!
[06:51:07] <mnek84> im a new user in mongodb, and want to build a stat schema
[06:51:20] <mnek84> but im confuse about preagregation and mapreduce
[06:51:45] <mnek84> both should be call once or everytime i insert a document?
[07:03:11] <mnek84> Hello!
[07:08:24] <mnek84> someone can help, im new on mongo and im trying to make a stats database for links, and i need some advices about preagregation and mapreduce..
[07:25:27] <mnek84> i should execute mapreduce each time a make an insert?
[07:42:15] <joannac> mnek84: I am not at all clear what you are trying to do.
[10:43:32] <ev0x> hi guys
[10:44:00] <hno> hi
[10:44:01] <ev0x> slightly stuck. Im trying to find the data type of a specific column
[10:45:17] <ev0x> i need to modify the value in one of the records.. a standard update kills it becuase app seems to think the datatype is wrong
[10:48:06] <kali> there is no columns, and no records, but fields and documents. it's not only terminology: there is no enforcement of the type of the value of a field in mongodb
[10:48:27] <kali> ev0x: but your app may make assumptions
[10:48:31] <ron> there's no enforcement, but there *are* types.
[10:49:19] <ev0x> hrmm
[10:49:21] <ev0x> i get this
[10:49:25] <ev0x> Query multi failed : users : {} : NULL : wrong type for field (ip masks) 2 != 4
[10:49:32] <ev0x> after i update the "ip masks"
[10:49:58] <kali> show us the update
[10:50:03] <kali> and the document
[10:50:08] <ev0x> db.users.update( { name: "ev0x" }, { $set: { "ip masks": "*@*" } }, { multi: true } )
[10:51:10] <ron> can you show us an original document?
[10:51:30] <ev0x> the db gets created when you try to run the app the first time
[10:52:14] <ev0x> only have raw c++11 src
[10:54:12] <ev0x> somewhere in here maybe? https://github.com/jawr/ebftpd/tree/master/src/db/user
[10:55:13] <kali> well, many things suggest ip mask is expected to be an array
[10:55:31] <kali> bson type 4 is array (2 is string)
[10:55:35] <ron> if you update the document manually, why can't you read a sample before updating and show us?
[10:56:01] <kali> so i guess you're breaking your app by storing a string where it expects an array
[10:59:40] <ev0x> ron: sorry i dont understand you properly.. this is the first time ive used mongo.. im a mysql user normally
[11:00:52] <ron> ev0x: well, what kali told you makes sense. try running db.users.update( { name: "ev0x" }, { $set: { "ip masks": ["*@*"] } }, { multi: true } ) and see if the problem is solved.
[11:03:57] <ev0x> ron: thanks using the [] seems to have fixed it
[11:04:24] <ron> ev0x: thank kali, he's the one who suggested it.
[11:08:32] <ev0x> thanks kali
[11:08:33] <ev0x> :)
[14:19:39] <rohanrhu> hi
[14:27:05] <rohanrhu> how is mongo vs postgres benchmark?
[14:33:59] <Chepra> rohanrhu: depends ;)
[14:38:22] <rohanrhu> Chepra: i'd read "mongo collects datas before writing"
[14:41:39] <Chepra> rohanrhu: what are you talking about? ;)
[14:42:56] <rohanrhu> Chepra: is there a reliable article about mongo's performance
[15:20:54] <rohanrhu> Chepra: is there a reliable article about mongo's performance?
[21:23:43] <lilleman> Newbie question: While trying to connect to my local mongo server from PHP I get "No candidate servers found", but the mongo-shell works fine
[21:23:54] <lilleman> Hints on where to look for answers are very welcome :)
[21:29:02] <spellett> your connecting to mongodb://localhost?
[21:29:51] <spellett> new to mongo as well but the reference manual mentioned that location for connecting
[21:30:19] <lilleman> spellett: In bash I just write "mongo", and the mongodb server is installed on the same machine... so I assume its on localhost :)
[21:30:28] <lilleman> I tried connecting to 127.0.0.1 also...
[21:30:38] <spellett> at the correct port number?
[21:30:53] <lilleman> Didnt try with a port in PHP, sec I'll try
[21:32:09] <lilleman> Trying this with no luck: $mongo = new MongoClient('mongodb://localhost:27017');
[21:32:48] <yw0> hello
[21:32:53] <lilleman> yo
[21:33:28] <spellett> what did you have passed into MongoClient prior?
[21:33:44] <omnidan> lilleman: new MongoClient(); defaults to new MongoClient('mongodb://localhost:27017');, can you paste the whole code?
[21:33:47] <yw0> I'm starting to use mongo. I found the server prints out pretty large json obis even if I have used --quiet option to start it
[21:34:16] <lilleman> spellett: At first I just used new MongoClient() with no params, with the same result
[21:34:23] <lilleman> omnidan: Hold on, fixing you a pastebin
[21:34:28] <yw0> This often hangs my client for several minutes. I have pretty large objects
[21:35:00] <omnidan> lilleman: also php version/mongodb driver version
[21:35:41] <lilleman> omnidan: http://pastebin.com/BED3XzT6 - entire code I use for labbing
[21:36:34] <lilleman> omnidan: PHP Version 5.4.20-1~dotdeb.0
[21:37:06] <lilleman> PHP gives me mongo version 1.4.3... dont know if that is the driver version and/or the server version
[21:38:30] <omnidan> lilleman: does running just <?php $mongo = new MongoClient(); ?> work?
[21:39:52] <lilleman> omnidan: It does not throw an error... WEIRD! something in my code triggers this
[21:40:14] <lilleman> It is inside a controller in a Kohana framework instance... should not bother it, but obviously it does
[21:40:29] <lilleman> Thank you, now I know where to look for the error :)
[21:40:29] <omnidan> lilleman: it seems like a replica set issue tbh
[21:40:39] <lilleman> replica set?
[21:41:00] <omnidan> put: MongoLog::setModule( MongoLog::ALL );
[21:41:01] <omnidan> MongoLog::setLevel( MongoLog::ALL );
[21:41:16] <omnidan> might give you more info
[21:44:57] <lilleman> omnidan: Thanks, I'll do that