PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Monday the 3rd of August, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:51:39] <punnie> yeah, upgraded the replica set with 2 beefier servers
[00:51:51] <punnie> hidden
[09:22:42] <fontanon> Hi everybody, I got something wrong with the balancer ... perhaps somebody could help .... Failed with error 'could not acquire collection lock for podsystem.pwcdr to migrate chunk [{ : MinKey },{ : MaxKey }) :: caused by :: Lock for migrating chunk [{ : MinKey }, { : MaxKey }) in podsystem.pwcdr is taken.', from shard0001 to shard0000
[10:19:30] <fontanon> Hi everybody, I got something wrong with the balancer ... perhaps somebody could help .... Failed with error 'could not acquire collection lock for podsystem.pwcdr to migrate chunk [{ : MinKey },{ : MaxKey }) :: caused by :: Lock for migrating chunk [{ : MinKey }, { : MaxKey }) in podsystem.pwcdr is taken.', from shard0001 to shard0000
[11:05:03] <joannac> fontanon: still seeing balancing? or not?
[11:05:22] <fontanon> joannac, yep
[11:06:30] <joannac> then there's no issue
[11:06:31] <fontanon> joannac, well now is not balancing and the error stills appearing
[11:06:54] <fontanon> balancer: Currently enabled: yes Currently running: no
[11:07:01] <fontanon> 1 : Failed with error 'could not acquire collection lock for podsystem.pwcdr to migrate chunk [{ : MinKey },{ : MaxKey }) :: caused by :: Lock for migrating chunk [{ : MinKey }, { : MaxKey }) in podsystem.pwcdr is taken.', from shard0001 to shard0000
[11:07:01] <fontanon> 1082 : Failed with error 'moveChunk failed to engage TO-shard in the data transfer: can't accept new chunks because there are still 1 deletes from previous migration', from shard0001 to shard0000
[11:07:23] <joannac> is shard0000 healthy?
[11:07:31] <joannac> why is it stuck on a delete?
[11:50:36] <fontanon> joannac, how to know if it is healthy?
[12:05:28] <fontanon> sorry joannac I dropped my irc connection. what do you mean with a healthy sharding ?
[12:11:37] <fontanon> joannac, i've put a sh.status() on the following pastebin http://pastebin.com/rdB4SssW
[12:31:43] <jayjo> Has anyone used stream-to-mongo?
[12:32:06] <jayjo> It gives example code ... do you exectute this code from within the mongo shell?
[12:33:57] <StephenLynx> never heard about that
[12:41:47] <jayjo> StephenLynx: do you execute js from within the mongo shell?
[12:41:55] <StephenLynx> no
[12:42:07] <StephenLynx> just regular syntax.
[12:42:17] <StephenLynx> db.col.find() and stuff
[12:42:45] <StephenLynx> when I need to text complext stuff I write stand-alone io.js scripts and run them with io.
[12:42:58] <StephenLynx> never bothered running scripts directly from the terminal.
[12:48:38] <jayjo> is there a better way to stream server-event http data straight to my mongo instance?
[12:51:06] <StephenLynx> with application code.
[13:55:26] <vagelis> Hello, i use python and pymongo. Is it possible to store data or the mongo database in memory(or something like that) so unit tests can run faster? Im not familiar with this i learn it 5' ago cause my tests take too long and i asked if there was a way to make them run faster.
[13:57:24] <StephenLynx> you can always store data in RAM, but then I don't think your tests will represent the actual scenario they should be testing in the first place.
[14:01:15] <vagelis> The other guy told me that he uses postgres and in every test he resets the database so he doesnt create it every time. Does mongo/pymongo have something like that? :S
[14:10:06] <ekristen> I had a collection that had grown over the months to be millions of entries, since then we’ve pruned it back down to around 10k entries, but in that time the database went from 50gb to 860gb, can I run compact to gain some of that space back?
[14:11:35] <ekristen> the size is now 100MB but the storage size is 680gb
[14:19:30] <fontanon> joannac, sorry for bothering ... did you have some time to have a look at my sharding status here? http://pastebin.com/rdB4SssW
[14:24:18] <bigblind> Can someone tell me what the documentation here means by sub-collection? http://api.mongodb.org/python/current/api/pymongo/collection.html#pymongo.collection.Collection
[14:25:22] <bigblind> is that the collection of al the embedded documents for the given key in each document in the collection?
[14:25:45] <cheeser> the wording is weird but i think it's saying just the name of the collection rather than its fully qualified name of <database>.<collection>
[14:29:31] <bigblind> cheeser: Sorry, I'm not talking about the constructor, but the c[name] (or c.name) definition below that.
[14:29:58] <cheeser> i am, too.
[14:30:06] <StephenLynx> vagelis no. you don't have to create anything, though.
[14:30:22] <StephenLynx> collections and databases are created automatically once you write anything to them.
[14:30:34] <StephenLynx> I just suggest you use ensureIndex at every boot.
[14:30:55] <vagelis> StephenLynx yea i completely forgot about removing everything from colections after every test(teardown) but now im searching how to create the database only once :|
[14:31:15] <StephenLynx> I just drop the database when I want to.
[14:31:31] <StephenLynx> it doesn't change anything to me if the database is there or not.
[14:31:36] <StephenLynx> I ensure the indexes and boot.
[14:32:19] <vagelis> how could i create the database only once? I mean i know the setup,teardown methods but then what? :S
[14:32:35] <StephenLynx> again
[14:32:39] <StephenLynx> you dont create databases.
[14:32:40] <ekristen> question, if I have an index that has had millions of entries and on disk has grown to 860gb, but it is currentl only 100mb, will compact give that back to me, or would it just be easier to backup the documents that are currently in it, delete the collection, and re-add the collection and restore the documents? it only has a few thousand right now in it ...
[14:32:44] <StephenLynx> it is created when necessary.
[14:32:50] <vagelis> oh
[14:32:55] <vagelis> ok
[14:32:58] <vagelis> ill try
[14:42:17] <GothAlice> ekristen: Compact won't free allocated disk space, it'll just rearrange the data within that disk space to have fewer "holes" (depending on how often you update and grow record sizes, delete records, etc.)
[14:42:32] <ekristen> GothAlice: that is what I thought
[14:42:35] <ekristen> GothAlice: thanks
[14:42:37] <GothAlice> ekristen: A full repair, which writes out new data files, then moved them in place over the originals, _will_ free on-disk stripes.
[14:43:18] <StephenLynx> GothAlice is it possible to shard gridfs, right?
[14:43:28] <GothAlice> StephenLynx: Sure is.
[14:43:31] <StephenLynx> noice
[14:43:57] <StephenLynx> I got a person that displayed interest in my project that has this issue,
[14:44:03] <ekristen> GothAlice: in a replicaset, is the best way to do a full repair by doing it on a secondaries first?
[14:44:21] <StephenLynx> it constantly has to add new hard drives to the system to accommodate static files.
[14:44:26] <GothAlice> Depending on your tasks, it's generally a good idea to keep file stripes for the same file together, but that'll depend on usage. If random seeking in very large files is desireable (i.e. to support multiple streaming users) then spreading the chunks around may become a better idea.
[14:45:12] <lqez> ekristen: http://docs.mongodb.org/manual/reference/command/compact/#disk-space says as like as GothAlice
[14:45:20] <lqez> compact requires up to 2 gigabytes of additional disk space while running. Unlike repairDatabase, compact does not free space on the file system.
[14:45:28] <GothAlice> ekristen: Doing it on a secondary first is generally a good idea both as a "test run" and because the secondary will become primary when you bring the primary down to --repair it, so it'll save some time going back and forth if you do the secondaries first.
[14:45:30] <lqez> .. but I'm too late lol
[14:45:43] <ekristen> GothAlice: thanks
[14:45:50] <GothAlice> lqez: :)
[14:45:54] <ekristen> GothAlice: that is what I thought, thanks for the validation :)
[15:24:56] <csd_> What's the easiest way to update one field for every document within a collection?
[15:25:29] <csd_> I don't know how to give some sort of All parameter to update's query arg
[15:25:32] <StephenLynx> update({},{update here})
[15:25:47] <csd_> ah
[15:25:49] <csd_> thank you
[15:25:51] <StephenLynx> np
[16:55:22] <ksmtk> hi
[16:55:29] <ksmtk> need your help guys
[16:55:36] <ksmtk> I have ubuntu server on amazon
[16:55:50] <ksmtk> and trying to setup auth mongo db
[17:34:53] <LauraG> Hello, I've a question, let's say I have semi-huge collection with an indexed INT field, if I want to start using "strings" instead, do I have to reindex my collection? And do I have to make separate queries to fetch the documents with the "int" field and the ones with the "string" field?
[17:36:31] <cheeser> no, you don't. though your queries will probably need a look.
[17:36:55] <cheeser> yes, to the second part: you'd have to do one query per field type
[17:44:00] <LauraG> Thanks cheeser!, so technically I could use something like this for my query: {"$or": [{"field": 1}, {"field": "1"}]}, and still get an indexed query
[17:44:32] <cheeser> i think so, yeah.
[17:44:59] <cheeser> you'd probably want to migrate your data at some point, though.
[17:45:04] <crazydip> from what I've read, WiredTiger in MongoDB 3.0.5 is not supported in PPC64, but what about PPC64LE?
[17:49:20] <LauraG> cheeser: is there an "update" operator to transform my data (ints to string) or do I have to do this manually, as in write a forEach function instead that updates the type.
[17:50:34] <cheeser> you can $set the value after converting, sure.
[17:51:01] <cheeser> search using $type on that field then in forEach() $set them to the new converted type.
[17:53:25] <saml> isn't canonical way to migrate data with zero downtime mongo-connector?
[17:58:55] <cheeser> migrate how?
[18:06:21] <RWOverdijk> Something I've never quite understood about mongo is how to manage associated data (joins). I know mongo doesn't have joins, that's the confusing part. Say I have addresses and activities. I want to be able to query both. I also want to be able to fetch activities, and also get their associated addresses. Would I have to query address for every activity?
[18:07:25] <StephenLynx> its simple
[18:07:27] <StephenLynx> there are no joins
[18:07:28] <StephenLynx> :v
[18:07:32] <StephenLynx> ah
[18:07:36] <StephenLynx> hold on let me read the rest
[18:07:40] <RWOverdijk> *sigh*
[18:07:41] <RWOverdijk> :p
[18:07:50] <StephenLynx> I have this habit or replying stuff before reading it completely
[18:08:04] <RWOverdijk> I've noticed in the past. It's quite amusing sometimes
[18:08:08] <StephenLynx> :3
[18:08:10] <RWOverdijk> Brain speed > reading speed
[18:08:22] <StephenLynx> yes, you will have to query separately for data.
[18:08:40] <RWOverdijk> Damn it
[18:08:47] <RWOverdijk> I'm in a pickle
[18:08:54] <RWOverdijk> I love mongo geospatial... everything
[18:08:54] <StephenLynx> options are:
[18:09:00] <StephenLynx> A- duplicating data
[18:09:16] <StephenLynx> B- performing an additional query for additional data
[18:09:32] <StephenLynx> which option is the least worst depends on your scenario.
[18:10:00] <RWOverdijk> Or could I C- Use mongo to retrieve IDs and then query my relational database for the actual data?
[18:10:07] <StephenLynx> usually if you can perform just a single additional query for each collection involved, it isn't thaaaaaat bad.
[18:10:09] <StephenLynx> hm
[18:10:13] <StephenLynx> yes, you can do that.
[18:10:18] <RWOverdijk> It will use the same tablke
[18:10:20] <RWOverdijk> table*
[18:10:38] <StephenLynx> if your critical data is not on the relational database, mongo can still be relevant on that setup.
[18:10:42] <RWOverdijk> It's just because mongo geospatial methods rule the universe
[18:11:11] <RWOverdijk> I'd use elasticsearch in stead of mongo, but that requires me to actually sync data.
[18:11:22] <RWOverdijk> Using mongo on the same table, doesn't.
[18:11:27] <StephenLynx> I personally frown upon adding stuff on top of databases.
[18:11:32] <StephenLynx> but I am kind of a purist.
[18:11:48] <RWOverdijk> What do you mean?
[18:11:51] <RWOverdijk> Geo stuff?
[18:12:03] <RWOverdijk> Because that's really best done at the database level (performance wise)
[18:12:16] <StephenLynx> no
[18:12:20] <StephenLynx> stuff like elastic
[18:12:23] <RWOverdijk> ah
[18:12:26] <RWOverdijk> Have you tried it?
[18:12:36] <RWOverdijk> It's amazing for large amounts of data
[18:12:43] <RWOverdijk> And just becing able to query whatever
[18:12:48] <RWOverdijk> being*
[18:13:43] <StephenLynx> yeah, yeah
[18:13:50] <StephenLynx> I can understand that.
[18:14:00] <StephenLynx> is the general principle of adding complexity to the setup.
[18:14:04] <RWOverdijk> ah shit wait I can't use mongo on the same table. That's stupid
[18:14:16] <RWOverdijk> Mongo is mongo.
[18:14:23] <StephenLynx> and elastic works on top of mongo.
[18:14:25] <StephenLynx> right?
[18:14:35] <StephenLynx> like some sort of gateway?
[18:16:37] <RWOverdijk> Well, not that I know no
[18:16:44] <StephenLynx> so how does it works?
[18:16:46] <RWOverdijk> You can have it analyse data
[18:16:50] <StephenLynx> ok
[18:17:04] <StephenLynx> and
[18:17:20] <RWOverdijk> So it uses your source database to create indexes based on your rules
[18:17:38] <StephenLynx> why don't you just create the index on the database itself in the first place?
[18:18:43] <RWOverdijk> StephenLynx, because that's sometimes not ideal
[18:18:47] <RWOverdijk> Like fulltext search
[18:18:56] <RWOverdijk> Or added benefits like geospatial queries
[18:19:08] <StephenLynx> hm
[18:19:47] <RWOverdijk> And, it allows you to search a structured database in a dirty manner
[18:20:06] <RWOverdijk> It sounds like a horrible argument, but it has proven to be very useful to me
[18:20:25] <RWOverdijk> anyway...
[18:20:35] <RWOverdijk> My problem is with geospatial queries right now.
[18:20:49] <RWOverdijk> And I'm starting to think mongo can't help me out with this one.
[18:21:01] <RWOverdijk> But I really want it to...
[18:22:10] <RWOverdijk> It looks like I have to get started with postgis
[18:24:51] <ksmtk> Error: couldn't add user: No role named userAdminAnyDatabase
[18:25:01] <ksmtk> what am i doing wrong?
[18:25:14] <ksmtk> I did `use mydb`
[18:25:29] <RWOverdijk> Well, there's no role named userAdminAnyDatabase
[18:25:42] <RWOverdijk> The error says so anyway
[18:25:56] <RWOverdijk> So I'm assuming you're trying to create a user with role userAdminAnyDatabase
[18:25:59] <RWOverdijk> Which doesn't exist\
[18:26:10] <ksmtk> but mongo docs say it's one of the built in roles..
[18:26:35] <ksmtk> db.createUser({ user: "myadmin", pwd: "mypass", roles: [{role: "userAdminAnyDatabase", db: "mydb"}] })
[18:26:49] <ksmtk> http://docs.mongodb.org/manual/tutorial/enable-authentication-without-bypass/
[18:27:24] <RWOverdijk> ehm
[18:27:32] <RWOverdijk> That only works in the admin db?
[18:27:35] <RWOverdijk> I think
[18:28:39] <ksmtk> I though admin is just a placeholder
[18:28:54] <ksmtk> how I can create a user for a specific db
[18:29:24] <RWOverdijk> ksmtk, http://docs.mongodb.org/v2.4/tutorial/add-user-to-database/
[18:30:08] <RWOverdijk> StephenLynx, One small extra question... Do you think that having 30 extra finds (on ID) with mongo would be a shame?
[18:30:16] <RWOverdijk> I know it's a performance killer with relational databases
[18:30:25] <StephenLynx> 30 extra operations?
[18:30:28] <StephenLynx> yeah
[18:30:29] <RWOverdijk> So grabbing the Address values one by one
[18:30:37] <StephenLynx> bad
[18:30:42] <RWOverdijk> Crap
[18:30:47] <StephenLynx> if you could use a single find though
[18:30:51] <StephenLynx> it wouldn't be so bad.
[18:31:05] <RWOverdijk> What would such a find look like?
[18:31:22] <StephenLynx> a regular find.
[18:31:29] <RWOverdijk> yeah
[18:31:35] <StephenLynx> that would grab all the documents you need
[18:31:35] <RWOverdijk> Oh wait
[18:31:38] <StephenLynx> if its just 30 you can use to array safely
[18:31:39] <RWOverdijk> Perhaps using in?
[18:31:49] <StephenLynx> no idea how your data is structured
[18:31:51] <RWOverdijk> and then matching those to my results in code
[18:32:14] <RWOverdijk> Simple: Activity has an address property, which is the ID of the document from Address
[18:32:37] <StephenLynx> just find({address: stuff._id}).toArray()
[18:33:08] <RWOverdijk> But that's the thing, I'm doing the geospatial stuff on activity
[18:33:15] <StephenLynx> hm
[18:33:20] <StephenLynx> that is what I don't know about your data
[18:33:36] <RWOverdijk> Good point
[18:33:44] <RWOverdijk> But you did give me an idea.
[18:41:16] <ksmtk> RWOverdijk: btw your doc is v2.4, I'm using v3.0
[19:10:32] <RWOverdijk> ksmtk, more or less same thing
[19:10:46] <RWOverdijk> I googled your question and gave you back the first result
[19:11:13] <shortdudey123> i am using the mongodb 3.0.4 rpm install from the mongo repo on CentOS 7.1, when i start the mongo service, it complains about soft process limits being 4096. The default init file that the package drops has
[19:11:21] <shortdudey123> ulimit -u 64000
[19:11:22] <shortdudey123> anyone seen this before?
[19:17:00] <RWOverdijk> StephenLynx, Another idea! Fetch all activities, then fetch all addresses where id in []. Then loop the activities and replace the ids with the address objects
[19:17:12] <RWOverdijk> That'd only be two queries, and very optimized code execution
[19:17:36] <RWOverdijk> (id in would be the address ids as collected from the activity results)
[19:18:02] <RWOverdijk> btw if you want me to stop asking you directly, let me know. I can imagine it's getting a bit annoying.
[19:41:15] <StephenLynx> its ok
[19:41:22] <StephenLynx> if I am busy I just ignore and keep working :V
[19:41:46] <StephenLynx> and if you can perform just two queries, then its ok.
[20:38:32] <mrmccrac> trying to setup RBAC within a sharded environment, turned on authorization on my config servers and my shard, when i restart everything mongos has the following error:
[20:38:43] <mrmccrac> 2015-08-03T20:33:35.141+0000 E SHARDING [mongosMain] could not verify that config servers are in sync :: caused by :: no config servers successfully contacted :: caused by :: not authorized on config to execute command { dbhash: 1, collections: [ "chunks", "databases", "collections", "shards", "version" ] }
[20:39:05] <mrmccrac> created a root user that belongs to the root role
[20:39:30] <mrmccrac> i think i need to tell what credentials mongos needs to use when talking to the config servers..?
[21:21:52] <shortdudey123> i am using the mongodb 3.0.4 rpm install from the mongo repo on CentOS 7.1, when i start the mongo service, it complains about soft process limits being 4096. The default init file that the package drops has ulimit -u 64000. Anyone seen this happen before?
[23:10:40] <EllisTAA> i’m trying to install mongo but how do i set permissions?
[23:45:05] <cheeser> doh! left two minutes too soon.