PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Wednesday the 14th of October, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:02:57] <Bioblaze> http://pastebin.com/KYSC5dyt thats my current ProductSchema
[00:03:20] <Bioblaze> I plan to use the _id of the Product + the Security Token as a Auth Key more or less :X
[00:18:40] <Bioblaze> is there a way to specify the Date Data you store?
[00:18:48] <Bioblaze> like Year-Day-Month?
[00:19:24] <Bioblaze> I wanna store my Date information as ISO 8601 format. Is there anyway to do that? XD @.@
[00:44:08] <happyken> Hi steffan can you help me with this question: have mongo db with multiple databases having common prefix. I want to have common account credentials for dbs having common prefix. Is this use case possible by any chance ?
[00:53:10] <steffan> happyken: There is not, afaik, any way to do this automatically. You could write something to generate / synchronize credentials, perhaps, or possibly use external authentication
[00:53:53] <happyken> steffan ok got it. thanks for the response.
[00:54:20] <steffan> (You will need the Enterprise version for external auth)
[00:55:12] <StephenLynx> are you talking about mongodb?
[01:10:24] <steffan> StephenLynx - either that or one of us is in the wrong channel
[01:11:31] <StephenLynx> the thing is
[01:11:33] <StephenLynx> mongo is FOSS
[01:19:54] <steffan> Well, there is this: https://www.mongodb.com/products/mongodb-enterprise-advanced
[01:20:14] <steffan> There are some features that only exist at this time in the commercial version. SSL used to be that way
[01:21:24] <steffan> Naturally, there is freedom for someone to independently develop, e.g., Kerberos support for the open-source version, but to date, I don't believe anyone has done so
[01:24:29] <StephenLynx> afaik, the SSL thing was an issue with cross compiling.
[01:27:00] <StephenLynx> http://info-mongodb-com.s3.amazonaws.com/MongoDB_Enterprise_Advanced_Datasheet.pdf
[01:27:10] <StephenLynx> which one is the external auth?
[01:29:16] <StephenLynx> kerberos?
[01:29:24] <StephenLynx> is the only actual feature from all the stuff is listed.
[01:44:22] <steffan> Ops Manager / Kerberos & LDAP / SNMP support are not in the Community version
[01:44:42] <steffan> Yes, using an external Kerberos / LDAP / Active Directory server is what I was referring to by external auth
[10:50:35] <braqoon> Hi, I have a replicaset that i need to change ID of it. I know this is not possible but ID have to be changed anyway. Will removing all nodes from replicaset and re-adding them under new replicaset without removing any data in DB is possible ?
[11:23:51] <joannac> braqoon: do you mean changing the replica set name?
[14:59:16] <cheeser> hear hear!
[15:22:20] <dhanasekaran> Hi Guys, I am new to mongodb, Currently I have some with mongo with wiredTiger storageEngine, It's every thing keep memory, but not Reclaiming memory to OS please guide me.
[15:22:54] <StephenLynx> you talking about RAM?
[15:23:01] <dhanasekaran> yes
[15:23:07] <StephenLynx> hm
[15:23:16] <StephenLynx> are you running out of RAM?
[15:23:55] <dhanasekaran> yes, I have 64 G, currently mongod using 55g
[15:24:14] <dhanasekaran> already started swaping..
[15:24:20] <StephenLynx> how big is your database?
[15:25:01] <dhanasekaran> 32.671GB
[15:25:36] <StephenLynx> over 30tb then?
[15:26:03] <dhanasekaran> StephenLynx: it's 32 GB
[15:26:10] <StephenLynx> ah
[15:26:16] <StephenLynx> so 32.671mb
[15:26:48] <StephenLynx> I am not 100% sure but it could be one of these two things:
[15:27:12] <StephenLynx> A: WT is leaking. try running with the default engine, WT will only be the default by 3.2
[15:27:18] <StephenLynx> B: the application is leaking.
[15:27:31] <StephenLynx> did you tried stopping the application?
[15:27:43] <StephenLynx> is the application running on the same machine than the database?
[15:28:12] <StephenLynx> nvm, you probably checked that, you asserted that the mongod is consuming the RAM.
[15:28:30] <StephenLynx> so yeah, if that's correct, WT is leaking, IMO.
[15:30:03] <dhanasekaran> I already stopped application. application running different machine, I need compression , that's why moved to WT
[15:31:08] <StephenLynx> how large would be your database if you were not compressing, any idea?
[15:32:09] <dhanasekaran> without compression more than 100GB, with compression 32 GB
[15:33:28] <StephenLynx> I would make a test to see if it consumes as much RAM with the default engine, at least.
[15:33:35] <dhanasekaran> it's possible enable compression MMAPv1 ?
[15:36:14] <cheeser> nope
[15:50:33] <bdiu> I'm using the aggregation framework to sum 15 or so fields on ~ 2 million records... the performance here seems slow 30 seconds + per query. Anyone interested in providing some suggestions or advice for this type of reporting?
[15:51:38] <bdiu> I'm not sure if Mongo is the appropriate solution to our problem... I'm considering alternatives such as a Postgres (with or without the foreign data source connector) or elasticsearch
[15:52:43] <StephenLynx> show me the query.
[15:53:56] <bdiu> one sec.
[16:00:55] <bdiu> @StephenLynx here's an example of one use: https://gist.github.com/bendalton/e7b5a7a781764cfc291b
[16:01:28] <bdiu> we have appropriate indexes on the match portions
[16:01:55] <StephenLynx> any particular reason you have multiple consecutive matches?
[16:03:38] <StephenLynx> why do you query for a particular user and then group?
[16:03:51] <StephenLynx> that could be done with a findOne
[16:03:52] <bdiu> a byproduct of the code generating the query... not intended. good eye... also the text of that query changed the date format to a string... so not, in itself, a valid query
[16:03:59] <StephenLynx> >code generating the query
[16:04:01] <StephenLynx> yeaaaah
[16:04:07] <StephenLynx> thats usually a bad idea.
[16:04:19] <StephenLynx> code is not smart enough to that, IMO.
[16:04:23] <StephenLynx> try using a findOne
[16:04:28] <StephenLynx> and tell me how long it takes.
[16:04:29] <bdiu> it's not a single users
[16:04:30] <bdiu> *user
[16:04:39] <bdiu> it's all records that have a user, then we group by user
[16:04:42] <StephenLynx> >user: { '$in': [ 561827f372bcd41e31a35977 ]
[16:04:52] <bdiu> oops, pasted wrong query
[16:04:53] <bdiu> one sec
[16:08:31] <bdiu> @StephenLynx thanks for looking, updated the gist
[16:09:14] <StephenLynx> why two consecutive matches?
[16:09:48] <StephenLynx> is the field user unique?
[16:10:47] <bdiu> yes.. the double match is unintended... should be combined into one.. testing the impact of that now
[16:11:03] <StephenLynx> is the field user unique?
[16:11:52] <bdiu> no, it's a foreign key reference effectively
[16:12:01] <StephenLynx> ok.
[16:12:19] <StephenLynx> so what you wish to accomplish is the total amounts of the log data?
[16:12:26] <bdiu> yes, per user
[16:12:42] <StephenLynx> what I would do is to have a third pre-aggregated collection.
[16:13:30] <StephenLynx> it would add an additional update when you add a log, but since you got so many logs, it would be much more effective when reading.
[16:13:56] <StephenLynx> or you could just fetch this data from a single user at time based on user-demand.
[16:14:24] <bdiu> okay.. glad to know you've got the same instinct. the trick here is that the selection criteria for the logs is variable i.e., the $match portion here changes based on external, dynamic critera
[16:14:42] <StephenLynx> the problem is not that.
[16:14:54] <StephenLynx> the problem is trying to group the whole 2m records at once.
[16:15:11] <StephenLynx> that just won't fly.
[16:16:29] <bdiu> sigh. don't we know it.
[16:18:09] <bdiu> so, triplogs has properties mode and dateTime, we need to be able to basically say, I want user totals of triplogs between dates X and Y, where triplog.mode is $in:['mode1','mode2']...
[16:20:31] <bdiu> though not the full 2mm documents, frequently the resulting count from the match is 1 million + records...
[16:21:01] <dhanasekaran> StephenLynx: Have inserted data to MMAPv1 still holding memory, not releasing to OS, any idea please guide me
[16:21:17] <StephenLynx> tried rebooting the whole thing?
[16:21:50] <dhanasekaran> have tried separate mongo instance
[16:24:03] <StephenLynx> no idea then what might be.
[16:24:19] <StephenLynx> it shouldn't be by no means using more RAM than enough to storage the whole dataset.
[16:24:25] <StephenLynx> I might double check everything.
[16:24:46] <bdiu> StephenLynx: if you were faced with the requirement of looking at this data, dynamically, for each user on millions of records without a reasonable way to pre-aggregate, would you have an alternative technology choice?
[16:25:04] <ViolentR> hi does anyone worked with map_reduce function ?
[16:25:26] <bdiu> ViolentR: I'm sure many people have here, what's your question?
[16:25:34] <StephenLynx> no, I wouldn't.
[16:25:42] <StephenLynx> its too easy to pre-aggregate.
[16:25:53] <StephenLynx> there is no good reason to change the whole database.
[16:27:13] <ViolentR> thanks bdiu ;-) i have problem to extract data from primaryHardwareType hash i need only names but not values
[16:28:14] <ViolentR> bdiu https://jsfiddle.net/qvou39kr/
[16:28:35] <ViolentR> by names i ment keys
[16:31:04] <bdiu> the date range, and selection criteria for the triplogs change frequently... it's easy to pre-aggregate some of the common cases, but not all by any stretch. We already have pre-aggregation in place, but can't use it for most of the queries needed for our reporting purposes.. there are a dozen potential values for the modes property and we need to support queries against every combination. so short of pre-aggregating
[16:31:04] <bdiu> every combination (12 factorial, right?) I'm kind of stuck with dynamically aggregating these individual documents
[16:33:39] <StephenLynx> hm
[16:34:28] <StephenLynx> I would give less options for searching.
[16:34:41] <StephenLynx> you could pre-aggregate by date ranges.
[16:35:18] <StephenLynx> like, one entry per month on the pre-aggregated collection
[16:37:30] <StephenLynx> I had a similar problem, you know.
[16:37:37] <StephenLynx> with logs and search.
[16:37:58] <StephenLynx> the whole operation took too long, so if one could request enough times per second
[16:38:07] <StephenLynx> the server would crash because of RAM usage
[16:38:26] <StephenLynx> my solution? remove log search, make static HTML pages one for each day.
[16:38:37] <bdiu> yeah, we pre-aggregate per user on day, month, year and choose the appropriate granularity based on the search, combining them together as best we can... e.g., searching from 1/1/2014-3/13/2015, we'd select the values for all of 2014 + the month values for jan, feb, and finally the 13 day values for march
[16:39:13] <bdiu> it works well where we can use the pre-aggregates but where we cant, we have to resort to scanning the collection, and grouping by user
[16:39:34] <StephenLynx> sometimes you have to make compromises, IMO
[16:39:55] <bdiu> yep :-)
[16:40:45] <bdiu> back to my former question though... if you HAD to provide the full selectability and 30+sec queries were not reasonable, is there an alternative technology you might turn to?
[16:40:58] <bdiu> StephenLynx: thanks for your help, it's greatly appreciated
[16:41:05] <StephenLynx> np
[16:41:12] <StephenLynx> no.
[16:41:34] <StephenLynx> I don't really know anything else that can both store this much data and provide a fast search through it.
[16:41:58] <StephenLynx> redis can be faster than mongo, unless your dataset is larger than your RAM.
[16:42:17] <StephenLynx> which I assume is your case.
[16:42:30] <bdiu> heh. yeah... if not now, then soon.
[16:43:36] <StephenLynx> you got a manager bitching at you to make it "just werk"?
[16:44:45] <bdiu> just clients
[16:44:51] <bdiu> here's an example where we are using it: https://travelwisetracker.com/#/challenges/551ebeab8f8b81ac6d493473
[16:47:12] <bdiu> in this case, we heavily cache.. and this particular site has a much smaller overall data set...
[19:09:13] <dj3000> Hi, how does one sort using morphia?
[19:09:39] <dj3000> i have a query using the morphia java driver, and I want to sort the results on one of the fields. any ideas?
[19:10:17] <cheeser> .order() on the Query
[19:11:09] <cheeser> http://mongodb.github.io/morphia/1.0/javadoc/org/mongodb/morphia/query/Query.html#order(java.lang.String)
[19:11:40] <dj3000> nice, thanks!
[19:11:44] <cheeser> np
[19:16:19] <dj3000> so lets say i sort (order) ascendingly on a numeric field foo. will limit(5) return me the smallest 5 results?
[19:16:40] <cheeser> yes.
[19:16:52] <dj3000> cool
[19:29:16] <deathanchor> think of limit like eating hotdogs.... limit(5) means you can handle the first 5 hotdogs, but anymore and you'll puke.
[19:29:53] <deathanchor> works the same way in sql
[19:34:59] <StephenLynx> not really. is more about having the discipline to know you can't handle more than 5 hotdogs and not eating a sixth.
[19:35:26] <StephenLynx> instead of just buying the whole hotdog aisle
[19:35:37] <StephenLynx> and then throwing it all in the trash
[19:37:14] <jr3> Is there a way to tell mongo to sort an array by some property them remove all elements over a certain index?
[19:38:24] <StephenLynx> sort a sub-array?
[19:38:26] <StephenLynx> don't think so.
[19:42:00] <cheeser> "sort by some property?"
[19:42:06] <cheeser> is this an array of documents?
[20:01:56] <chrisOlsen> Hi everyone, is it possible to update a document with $set where the value is a further subdocument? e.g. { $set: {"My.Object.Chain": {"SubKey": "SubValue"}}}
[20:02:54] <cheeser> { $set { "my.object.chain.subkey" : "value" }}
[20:03:43] <chrisOlsen> Alright, thanks. I was hoping to not have to iterate over the subkeys
[20:49:39] <jr3> cheeser: I have a document that has an array of integers, I want to sort this array then remove any elements in the array after index 10
[20:54:53] <cheeser> you can maybe $unwind in an aggregation then limit 10
[21:00:40] <shlant> does secondary for replica set readPreference mean that even if the secondary is down, it won't read from Primary?
[21:00:53] <shlant> or what is the diff between secondary and secondaryPreferred
[21:02:36] <shlant> it says "In most situations, operations read from http://docs.mongodb.org/manual/reference/glossary/#term-secondary members but if no http://docs.mongodb.org/manual/reference/glossary/#term-secondary members are available, operations read from the http://docs.mongodb.org/manual/reference/glossary/#term-primary."
[21:02:43] <shlant> oh god
[21:03:12] <shlant> does that mean that it ONLY reads primary when secondary is unavailable? what is "most situations"?
[21:28:36] <SAIF> I need assistance setting up remote connection to mongodb
[21:28:54] <SAIF> cant set bindIP in config file,
[21:32:59] <SAIF> I am in windows,
[21:44:09] <Boomtime> hi SAIF, does the windows firewall permit mongod to open listening ports?
[21:44:59] <SAIF> I am still using the default ports.. Can I use the binding 0.0.0.0?
[21:46:08] <SAIF> whatever I give there, it says illegal map value
[21:49:45] <SAIF> 27017 port is open in windows firewall. Boomtime. Its the configuration file,
[21:52:18] <SAIF> net: bind_ip : 127.0.0.1, 172.xxx.xxx.176, 52.xxx.xxx.74 port: 27017
[21:53:42] <Boomtime> can you pastebin the conf instead?
[21:53:55] <Boomtime> also, you can just use 0.0.0.0 in bindip and it will bind to every interface
[21:57:49] <kernasi> hi
[21:58:07] <SAIF> There is nothing much in there.. http://pastebin.com/i9P2aBeb and this is the error http://pastebin.com/TsArQrTB
[21:58:37] <SAIF> well I just changed the bind ip to 0.0.0.0
[21:59:59] <SAIF> Boomtime:
[23:05:07] <fxmulder> so I have 2 sharded replica sets going, I added the second replica set earlier this year and it migrated data to from the first replica set to the second replica set. The first replica set seemed to retain the original records it migrated so we are doing a cleanorphan on it to clean it out.
[23:05:49] <fxmulder> I would expect that the empty space left by the removed orphans would be reused by new entries into the collection but disk space keeps climbing
[23:08:40] <fxmulder> disk usage that is
[23:08:45] <fxmulder> disk usage keeps climing