[02:06:05] <ohshitdacops> So I have a strange problem. I would provide logs, but there are none to provide
[02:06:53] <ohshitdacops> So I have MongoDB installed on one of my EL7 development environments and have noticed that whenever I restart the box, mongodb refuses to start and requires a full reinstall
[02:08:10] <ohshitdacops> The little info I can provide: [BOX: "CentOS 7", PACKAGE: "yum, via mongodb repo", ERROR: "failed state, no logs"]
[02:08:21] <ohshitdacops> any additional info can be provided per request
[05:26:53] <royaa1> Which style of mongoose query should I be using? The first or the second? https://gist.github.com/anonymous/922459bdcac5482d3132
[05:32:33] <catNode> Boomtime: I prefer the second one, but for some reason I have in my head that's an old way of doing it? I must've read that in documentation or on SO somewhere?
[05:32:57] <Boomtime> nope, the second one is merely making use of local helpers
[05:34:07] <Boomtime> the second tends to be eaier to read, construct, and maintain - the first one is more like what the server actually gets sent
[05:34:28] <catNode> Boomtime: that makes sense. thanks for the clarification
[05:34:54] <catNode> Boomtime: the first isn't quicker or more flexible than the other?
[05:35:29] <Boomtime> not really, the work to convert the second one is done on the client - but if that tiny amount of work affects you then you shouldn't be running a javascript interp in the first place
[05:38:28] <catNode> good point. thanks for the clarification
[09:16:31] <rspijker> Well, sharding being enabled is stored in the cfg servers iirc. The mongos processes do cache the config, but you can invalidate that
[10:39:42] <A13> hi there, I got a simmple question: can I copy the data files (from /data/db) to another server and start mongod there? will it work? I cannot start a damaged installation of mongodb to do a proper export..
[12:27:20] <shambat> I have data stored with entries like this: http://bpaste.net/show/2f6fd25f8306 -> How can I make a query to find entries where "sources" array is larger than 1. I have tried this, but it returns nothing: db.sigs.find( {sources : {$exists:true}, $where:'this.sources.length>1'} )
[13:00:42] <tehmoon> shambat: maybe you'll find the solution with aggregate()
[13:01:34] <tehmoon> $unwind the sources a group by _id and count
[13:04:28] <rspijker> caveat is when you could have sources that aren’t arrays but documents and could contain a field named 1…
[13:04:41] <rspijker> but bar that, it;s the most efficient way
[13:26:56] <remonvv> Hm, detail perhaps, but does anyone know why the shell prints NumberLong(1084752864) for numbers < 2^32 and NumberLong("10665270000") so with quotes for numbers > 2^32
[13:28:59] <jordana> remonvv: It's the do with the way JS handles ints
[13:30:19] <jordana> remonvv: I think JS only has a type that supports 8byte ints so it's a workaround
[13:31:08] <remonvv> Figured it was something like that, thanks
[15:25:57] <lha13> Hello, I've got the following stackoverflow question (http://stackoverflow.com/questions/25666187/mongodb-nested-group/25667256) and I 'm looking at
[15:26:28] <lha13> I'm looking at limiting the amount of results to 5 per array. How would I go about doing this? Any advice would be great thans!
[16:18:53] <oli47> well basically I am trying to do an update of some documents, and I need to match only the ones that do NOT contain a specific value in an array value
[16:19:18] <oli47> I tried by combining $elemMatch and $not but that didn't work
[17:21:53] <doug1> Why would I get, on the router, "can't authenticate to <some-cfg-server> as internal user, error: { ok: 0.0, errmsg: "auth failed", code: 18 }" ?
[18:43:44] <doug1> Why would I get, on the router, "can't authenticate to <some-cfg-server> as internal user, error: { ok: 0.0, errmsg: "auth failed", code: 18 }" ?
[18:49:50] <harttho> I'm seeing mongos proc's taking up different ports than 27017
[18:50:15] <harttho> Where is the configuration for the mongos connection ports that would result in taking up 9099?
[18:59:16] <harttho> Note: this is on a server with mongos running connecting to an external mongo server
[19:11:21] <doug1> Why would I get, on the router, "can't authenticate to <some-cfg-server> as internal user, error: { ok: 0.0, errmsg: "auth failed", code: 18 }" ?
[20:12:42] <skot> doug1, check to make sure you are using the same keyfile or x509 cert for both the mongos and config server.
[20:14:01] <skot> harttho: that is how ephemeral ports work when a process has to make outgoing connections; it is expected.
[20:18:26] <mattkremer> Alright, I'm in the middle of a meeting with my team and there are some crazy ideas floating around regarding speed of lookup with indexes. Would hashing the values of data in MongoDB actually increase the speed of lookups?
[20:19:32] <cheeser> are those values already indexed?
[20:20:10] <mattkremer> Yes, let's say that an index already exists. Are queries against that index going to be different if the data was stored as full string or as hash when it was initially inserted and indexed.
[20:20:23] <mattkremer> *are queries going to be different speeds
[20:23:15] <shadfc> I'm getting an OperationFailure "can't get runner for query". Trying to upload a file to gridfs using pymong. Mongdb 2.4 currently. Any ideas?
[20:23:24] <mattkremer> Alright, so if I know our data isn't going to be over 1KB, then it's not really going to matter at all?
[20:48:14] <akp> is there a findAll for mongo in php
[20:48:34] <skot> mattkremer, there is going to some measurable improvement with smaller strings since they will result in a smaller indexes and faster lookups.
[20:48:44] <skot> The faster lookup part is probably the less important part.
[20:49:20] <skot> akp: find by default will find all, unless you specify a limit.
[21:21:59] <skot> It is the shared credentials which secure intra-node communications
[21:27:12] <akp> is there anyway to just return it as a list or something so i can get a count from it and other things?
[21:28:16] <akp> or is that what the vardump thing will do for me
[21:30:50] <skot> I'm no php programmer, so I can't help there but would assume this would be a simple thing. In python it is just list(cursor), but php, don't know.
[21:35:24] <tscanausa> akp: you have to iterate the entire cursor. if you want a count call the count function with the query
[21:37:21] <tab1293> is there a faster way to convert a field type other than looping through every document with a foreach?
[21:37:47] <skot> Are you converting to the same value, or different values?
[21:38:07] <skot> If the latter, no, if the former, with an update.
[21:38:23] <tab1293> same value, they are numbers stored as strings and I want them to be integers
[21:38:39] <tab1293> I have about 350,000 docs in the collection. the foreach has been running for like 10 minutes
[21:38:58] <akp> tscanausa: thank you. i can call the count function with each find query?
[21:39:42] <skot> tab1293: Do you mean the same type, not same value. String is the type, "13", "15" or different values of strings.
[21:40:30] <skot> lol, so they all have different values... :)
[21:41:05] <tab1293> I thought you meant was I changing the actualy value like “15” to 13
[21:41:19] <tab1293> so a foreach is the only way?
[21:41:20] <akp> or would that be something that i run on the object i get back from my query?
[21:42:17] <skot> tab1293: yes, but you can update just that field, and run multiple threads to do the work since your client is probably the slow part.
[21:42:34] <skot> (also, just retrieving the field you want to change will reduce the network traffic)
[21:43:23] <skot> iterator_to_array(query) will return an array in php, so the internet says.
[21:54:23] <tab1293> woops minus that first line in the foreach
[22:13:40] <harttho> skot: is there a way to restrict which ports are being used for the outgoing connections?
[22:14:01] <harttho> or is there a set range of ports ephemeral ports can be on?
[22:14:01] <skot> harttho: consult your operating system docs.
[22:14:31] <skot> also, not sure why you would need to.
[22:15:02] <skot> they do not listen and are not incoming ports
[22:15:20] <harttho> Using Ubuntu 12.04 if you happen to know off the top of your head. We've run into some port collision of processes we have on the same ports and get eaddrinuse
[22:18:22] <skot> I searched the internet to return you these results: cat /proc/sys/net/ipv4/ip_local_port_range , echo "X Y" > /proc/sys/net/ipv4/ip_local_port_range
[22:19:20] <skot> I'd suggest you do that same or consult your sysadmin who manages the server.
[22:33:13] <freeone3000> I'm trying to shard *some* databases on the server, but not others. I've successfully (probably) sharded a database called "company-prod", but I'm attempting to *not* shard "company-config". However, mongo gives me https://gist.github.com/freeone3000/9cd6b4089246707dd91e . What am I doing wrong?
[23:36:16] <unholycrab> i want to add a new empty SECONDARY to a replica set, let it sync up all the data and join the replica set.... but i want to control when the election happens
[23:36:33] <unholycrab> ie: if i just let it go, it will force an election as soon as its done copying, whenever that happens to be
[23:42:53] <joannac> unholycrab: no, it won't force an election at all, assuming it doesn't ahvea higher priority than the current primary
[23:50:32] <freeone3000> I'm trying to shard *some* databases on the server, but not others. I've successfully (probably) sharded a database called "company-prod", but I'm attempting to *not* shard "company-config". However, mongo gives me https://gist.github.com/freeone3000/9cd6b4089246707dd91e . What am I doing wrong?