PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 9th of September, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:30:32] <jekle> autoburger: you are good with mongo, just throw mysql out of the window. you won´t regret =P
[00:53:25] <jekle> autoburger: for me the biggest difference is that you need to think about what you want to accomplish at the very beginning to end up with a proper schema. there are no normal-forms like in sql databases.
[02:26:59] <autoburger> mongo docs kinda a mess
[02:27:01] <autoburger> wow
[02:29:27] <Boomtime> autoburger: what are you having trouble with?
[02:32:22] <mango_> hello
[02:58:32] <classicc> In Mongoose, if how do I exclude certain properties from the resulting object on .save? eg. newUser.save(function(err, user) {... - exclude specified fields from the user object?
[03:31:09] <rfk_> any support for storing filesystem metadata in gridfs? or should i add the fields myself?
[04:21:34] <ome> With mgo, if I am scanning a query into a limit subset of the document attributes. Would that operation would be cheaper than scanning the document into a complete struct?
[04:21:48] <ome> mgo, the Golang driver.
[04:44:32] <Boomtime> ome: define "cheaper"
[04:44:51] <Boomtime> on the client it will certainly be cheaper, there is less data in the response to parse into native
[04:45:02] <Boomtime> it may be cheaper also on the server
[05:33:39] <ome> Boomtime: it may, or may not, that is the question. :)
[05:36:44] <Boomtime> so you are asking if there will be less work for the server?
[05:37:50] <Boomtime> your question was phrased entirely around the client, to which the answer is a definite yes, the client will have less work to do due to the less data it receives
[05:38:52] <Boomtime> the server-side is a bit more complicated; if you restrict the return fields to only those used by the index that services the query, then absolutely, the server will do less work - it can skip the document lookup and use the data contained in the index only
[05:39:38] <Boomtime> if the return subdocument contains fields not in the index, then the document has to be pulled into memory anyway
[05:40:16] <Boomtime> it can then return it all as is (it's BSON already, set to go) or it can reformat it the way you asked for
[05:40:40] <Boomtime> the reformatting might still be faster if you chop enough out
[05:41:40] <Boomtime> it is generally the case that restricting results to only include the fields you actually want is 99% of the time better off
[06:23:51] <adil> Hello. I have a PHP mongodb driver question
[06:37:10] <Boomtime> @adil: i don't know PHP very well, but you should ask your question as somebody else here might
[06:37:27] <adil> @Boomtime - k thx
[06:38:24] <adil> I have piece of code that deletes data from a Mongodb collection
[06:38:47] <adil> $sColl = ScreenData::getCollection(); $sColl->remove( array('batchId' => $batchId), array('multiple' => true, 'j' => true, 'socketTimeoutMS' => -1) );
[06:39:11] <adil> This remove function timesout () even though i have set 'socketTimeoutMS'
[06:40:03] <adil> Driver version 1.4.5
[06:42:57] <Boomtime> I was not aware you could pass socketTimeoutMS as a parameter at that level, but again, I don't know PHP
[06:43:45] <Boomtime> normally, you would set that in the connection-string, or other place at connection level
[07:27:43] <tuxtoti> Is there a mongo shell config file which gets loaded everytime you login to a mongo shell?
[07:49:39] <nEosAg> hello guyz
[07:50:09] <nEosAg> im facing weird issue, don't know if mongo has anything to do with it..
[07:52:02] <nEosAg> im saving "&#10003;" in one of the document as part of content...
[07:53:50] <nEosAg> but while query on shell like db.coldata.find({object:6588}) it shows actual "✓" sign which is html representation of that code(&#10003;)
[07:54:40] <nEosAg> so..does mongo do formatting while showing o/p on shell..i tried shell for viewing raw content of doc..
[07:55:36] <nEosAg> how to check raw content of doc...to see what actually get stored in DB..?
[07:57:39] <Eremiell> nEosAg: I believe, mongo stores everything in BSON, which is a binary format, so unless you can read ones and zeros, it needs to convert it back to JSON to show you.
[07:59:10] <Eremiell> but if you really really want to see the stored data, I guess, you can just cat the db storage files...
[08:00:23] <nEosAg_> Eremiell: so how can i know ..where is the mess..did code trying to insert that doc, has transformed that "code" to "html" ..
[08:00:57] <nEosAg_> or mongo client did ? or mongo did?
[08:01:37] <Eremiell> nEosAg_: whatever you get in mongo shell is what your program will get as well. you can tell, if the data is all right or not, don't you?
[08:03:23] <nEosAg_> Eremiell: i will take "&#10003;" to "✓" as change in data..
[08:04:00] <nEosAg_> thank you...
[08:17:30] <cofeineSunshine> namlook
[08:17:42] <cofeineSunshine> !seen namlook
[08:17:46] <pmxbot> Sorry! I don't have any record of namlook speaking
[08:17:47] <cofeineSunshine> hi
[08:17:56] <cofeineSunshine> anybody using mongokit?
[08:56:00] <tuxtoti> Ok. found it ~/.mongorc.js is the file that i was looking for
[08:57:38] <joelmoss> anyone familar with the Ruby BSON gem? I’m trying to convert BinData(3) to a string, but failing. can someone help please?
[09:00:55] <ranman> I can try to figure it out
[09:06:59] <joelmoss> ?
[09:07:03] <joelmoss> @ranman ?
[09:07:31] <ranman> joelmoss: I'm trying to figure it out... but I don't know ruby very well so it might take me a bit
[09:07:36] <joelmoss> BinData(3,"zUa8BN3haCgbHtmhvGy0tA==")
[09:07:41] <joelmoss> ok great, thx
[09:08:08] <joelmoss> its a UUID
[09:08:49] <joelmoss> unpack is the closest I’ve gotten… data.unpack(‘h*’)
[09:08:58] <joelmoss> that results in ["7ab4ea166ffb763d9eb059e42a092c5b"]
[09:09:09] <joelmoss> http://apidock.com/ruby/String/unpack
[09:17:19] <ayrus> Hi, Is there is any option to change the keys while fetching the data from MongoDB. Like in SQL (SELECT `user` AS `User1` FROM ~)
[09:21:44] <ranman> joelmoss: test = BSON::Binary.new("hello", type=:uuid_old)
[09:21:50] <ranman> test.data
[09:21:54] <ranman> returns "hello"
[09:22:42] <joelmoss> I think my problem is that the data is written by a Java app, but I need to read it from a Ruby app, so the byte order is different
[09:22:47] <ranman> joelmoss: so you're trying to get back: zUa8BN3haCgbHtmhvGy0tA== ?
[09:23:03] <joelmoss> no
[09:23:10] <joelmoss> in Mongo shell, it looks like BinData(3,"zUa8BN3haCgbHtmhvGy0tA==")
[09:23:23] <joelmoss> but the actual string value shouldlook like a UUID
[09:23:34] <joelmoss> like 61dfac18-73c7-443a-bced-db4e96e06457
[09:24:19] <ranman> what happens if you look at zUa8BN3haCgbHtmhvGy0tA== in hex instead of base64 ?
[09:25:39] <ranman> http://stackoverflow.com/questions/8244110/get-bindata-uuid-from-mongo-as-string
[09:25:41] <joelmoss> ends up with ["a74bae61f6bf67d3e90b954ea290c2b5"]
[09:25:54] <joelmoss> which is the right length, but has no hyphens and is actually wrong
[09:25:54] <ranman> ok yeah so I reckon the byte order is reversed
[09:26:02] <joelmoss> but its the closest Ive go to it so far
[09:26:35] <joelmoss> yeah I tried both “h*” and “H*”
[09:26:56] <joelmoss> http://apidock.com/ruby/String/unpack
[09:28:46] <ranman> maybe through a .reverse in there ?
[09:29:51] <joelmoss> :(
[09:29:55] <joelmoss> thx anyway buddy
[09:30:07] <joelmoss> just confirmed what I’m thinking, but no closer to fixing
[09:38:21] <ranman> joelmoss: if you figure it out can you ping me?
[09:38:26] <joelmoss> will do
[09:38:46] <joelmoss> may have to dig into https://github.com/mongodb/mongo-csharp-driver/blob/master/uuidhelpers.js
[11:58:14] <nofxx_> Crazy, strange issue, got a find() in my system was working flawless yeasterday, today its a devil's playground.... crazy pattern: 5 finds, 0.0042s each, then comes a 30seconds one! then 5 fast, 1 slow, 5 fast, 1 slow...
[11:58:26] <nofxx_> wtf??? nothing in profile, nothing is slow... totally lost what to try
[11:59:29] <nEosAg_> nofxx_: any updates on that collection/db ? version of client,mongo ?
[12:00:22] <Eremiell> indices reevaluation? some specific pattern to the queries?
[12:00:33] <nofxx_> nEosAg_, now there's lot of stuff running, but earlier on the morning same issue w/o load. mongodb 2.6.3
[12:02:23] <nEosAg_> nofxx_ : journaling enabled? pages flushing to disks after 5 finds..?
[12:02:55] <nofxx_> nEosAg_, humm.... its a find and modify* pardon ...
[12:03:04] <nofxx_> maybe linode's I/O playing with my patience
[12:13:04] <lgm> hello!
[12:13:29] <lgm> i'm attempting to run some basic tests on a mongo sharding setup.
[12:13:53] <lgm> i need to clean out what i've done and rerun everything
[12:14:19] <lgm> so, i need to remove all the shards
[12:14:28] <lgm> however, i'm getting this error
[12:14:35] <lgm> mongos> db.runCommand( { removeShard: "shardOne" } )
[12:14:35] <lgm> { "ok" : 0, "errmsg" : "Can't remove last shard" }
[12:14:35] <lgm> mongos>
[12:14:51] <lgm> any clues?
[14:19:34] <adamcom> lgm: realise it has been a while since you asked but basically if you are wiping and starting from scratch you can just drop the config database and then restart everything - all shard config and other meta data live in the config database (on the config servers), so once you delete it (and restart to make sure the old data is not cached somewhere) then you are back to square one. The removeShard command (as you have found) is for altering the config of an
[14:21:09] <Derick> adamcom: stopped at "the config of an"...
[14:28:43] <adamcom> was almost complete: is for altering the config of an existing sharded set up.
[14:29:01] <adamcom> and annoying that I don't get any messaging to tell me when that happens :/
[14:29:25] <Derick> adamcom: shitty client? :-)
[14:30:03] <adamcom> Derick: likely, but I refuse to run more than one, so I must sacrifice quality for broad compatibility
[15:05:33] <PeepDurple> Good day. I have a question related to updating an list of arrays. I have something like this in my documents -> http://pastebin.com/mhpKzVxD .. can someone explain how I can remove the second array out of the list entirely? It seems like there is no trivial way out there for this
[15:07:30] <Derick> that's not a document though, is it? it's only a part of it?
[15:07:33] <mipo> hello
[15:08:24] <mipo> is there any manual or books about how to develop mongodb core? I wish to develop mongodb core
[15:09:03] <cheeser> there was a recent discussion the mailing list about that, iirc
[15:09:37] <mipo> cheeser: you are with me?
[15:09:41] <PeepDurple> Derick: its a part of the document, thats right
[15:09:45] <cheeser> with you?
[15:10:32] <mipo> cheeser: mailing list was about developer manual?
[15:11:52] <Derick> PeepDurple: so with a key "FOO" ?
[15:12:55] <PeepDurple> It was just an example. Its a list containing n-amounts of addresses. I want to remove one address out of this list by using an index or in a similar way.
[15:12:56] <Derick> PeepDurple: you should be able to do: db.collection.update( { _id: YOUROBJECTID }, { $unset: { 'FOO.1' : true } } );
[15:13:22] <Derick> or, if you know the contents:
[15:13:37] <Derick> PeepDurple: you should be able to do: db.collection.update( { _id: YOUROBJECTID }, { $pull: { 'FOO' : {contentsobject }} } );
[15:16:09] <PeepDurple> That did it, Derick. Thank you very much! :)
[15:17:52] <cheeser> mipo: yes
[15:40:16] <MyS> http://i.imgur.com/Rt4Wi0M.png i like this
[15:41:03] <Derick> what part of it?
[15:52:03] <saml> hello, I have docs like {_id:1}, {_id:3}, .... where _id are natural numbers. not packed. there are jumps like 1, 2, 6, 50, 230 ... etc
[15:52:28] <saml> given an existing _id, can I have one query that gives me successor and predecessor ?
[15:53:10] <MyS> what Derick?
[15:53:58] <MyS> the part of MongoDB
[15:54:06] <saml> db.docs.find({_id: {$lt:10}}).sort({_id:-1}).limit(1) db.docs.find({_id:{$gt:10}}).sort({_id:1}).limit(1)
[15:54:10] <saml> i do these two queries
[15:54:17] <saml> but i want to do a one query
[15:54:33] <Derick> saml: I don't think you can do it in one go
[15:55:18] <saml> yah
[15:55:20] <saml> thanks
[17:21:59] <und1sk0> hey all
[17:21:59] <und1sk0> { "ok" : 0, "errmsg" : "couldn't initiate : need all members up to initiate, not ok : mongodb2-us-east-1:27018"
[17:22:02] <und1sk0> }
[17:22:08] <und1sk0> yet the host is up. what gives?
[17:24:26] <und1sk0> also, has anyone had problems with keyFile auth for replication after upgrading from 2.4 -> 2.6?
[18:39:42] <deanclkclk> how can I verify from bash if my mongod is setup as slave?
[18:40:51] <cheeser> rs.status() ?
[18:41:43] <MyS> tnks :3
[19:09:06] <murrdoc> quick question, mongodb doc says new config file is json
[19:09:38] <murrdoc> but the package install puts the old style config file in /etc/mongodb.conf
[19:10:12] <murrdoc> is the json config file required ? or not something to worry about
[19:47:59] <deanclkclk_> how do I change mongo db from Primary to secondary?
[19:50:04] <cheeser> rs.stepDown()
[19:57:33] <freeone3000> I'm using mongo 2.6.4, and my members of a replica set are taking way too long to sync records.
[19:58:17] <freeone3000> No CPU load, no memory load, low disk load. What could take so long?
[19:59:36] <deanclkclk_> and how do I provide the primary server IP address for the now secondary mongo?
[19:59:44] <deanclkclk_> @ cheeser
[20:06:45] <cheeser> what?
[20:18:16] <deanclkclk_> I just stepDown a primary server and I want to make it a slave of another primary mongodb
[20:18:48] <deanclkclk_> how do I provide the ip address of the primary mongod server to the slave?
[20:28:06] <cheeser> when a primary steps down, it'll be secondary for one of the other machines in the replica set. that will happen automatically.
[20:41:18] <freeone3000> What do I change to increase replication speed?
[20:41:46] <freeone3000> My secondary is stuck in "still syncing, not yet to minValid optime 540e1259:1"
[20:43:54] <RealNitro> I'm currently having problems with a master/slave mongodb
[20:44:07] <RealNitro> I was running a mongodump earlier this evening
[20:44:14] <RealNitro> from external host
[20:44:41] <RealNitro> I aborted the mongodump command (ctrl-c), since then, my mongodb refuses to do any work...
[23:10:14] <Acute_Angle> Howdy!
[23:31:21] <zfjohnny> How do I log all queries in my mongo db server to a file that I can tail?
[23:32:35] <joannac> zfjohnny: erm. you can either tail the mongod log with a grep to filter out other stuff
[23:32:49] <joannac> or you can turn on profiling
[23:32:58] <zfjohnny> In my mongod log file, there are no queries… just information about connections.
[23:33:58] <joannac> set your slowms to 0
[23:34:02] <joannac> wait, maybe 1
[23:34:11] <joannac> mongodb only logs queries >100ms by default
[23:40:05] <zfjohnny> is that somethign I can do in my mongo conf file? If so, what’s the commadn exactly? I’m a little confused about the syntax. Thank you for your help!
[23:40:50] <zfjohnny> So far I just have this:
[23:40:58] <zfjohnny> # Where to store the data.
[23:40:58] <freeone3000> What is causing my replication to take forever? My infomessage on my seocndary has said "still syncing, not yet to minValid optime 540e1259:1"" for three hours.
[23:40:58] <zfjohnny> dbpath=/var/lib/mongodb
[23:41:00] <zfjohnny> #where to log
[23:41:01] <zfjohnny> logpath=/var/log/mongodb/mongodb.log
[23:41:02] <zfjohnny> logappend=true
[23:43:49] <freeone3000> rs.printSlaveReplicationInfo() says that I'm 0 secs behind the primary, so why am I in "RECOVERING"?
[23:44:21] <joannac> logs?
[23:44:43] <joannac> look for RS102
[23:45:41] <joannac> zfjohnny: http://docs.mongodb.org/manual/administration/configuration/#diagnostic-configurations
[23:45:54] <freeone3000> joannac: https://gist.github.com/freeone3000/bd13f8f46c0cc574f461 and more of the same.
[23:46:16] <freeone3000> joannac: Ah. yes, just caught it.
[23:48:50] <freeone3000> joannac: "Resync a member of the replica set" worked brilliantly, thanks.
[23:53:00] <joannac> np :)