PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 11th of December, 2018

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:51:24] <goldstar> I am trying to sort on a unique index in asc order, but keep getting: "Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit."
[00:51:36] <goldstar> Anyone know how I can fix this ?
[00:52:14] <goldstar> it should work since the column is indexed, unless the unique index is only for desc or something
[00:52:27] <goldstar> or maybe I need a different type of index?
[05:47:45] <trelane> which servers in a shard need --shardsvr
[09:41:51] <mrus> hey there! Is there any way to connect to a specific secondary in a MongoDB replica set?
[09:45:43] <Derick> yes
[09:45:52] <Derick> at least, with most drivers there is
[09:48:40] <mrus> Derick: thanks! Do you happen to know about the Node.js driver?
[09:49:07] <Derick> I think that's the odd one out
[09:49:30] <Derick> Most drivers allow you to connect to a secondary by just using that hostname/IP address, and NOT specifiying replSet=name
[10:02:06] <mrus> Derick: thanks a lot for that info!
[10:03:32] <Derick> np
[13:58:20] <mrus> so, apparently the MongoDB Go driver (which is in beta now) doesn't support connections to a secondary as well. At least with the short snipped that I tested it errors with "server selection timeout".
[13:58:54] <Derick> that sounds odd
[13:59:07] <Derick> server selection means it's still trying a replset connection
[13:59:12] <Derick> what's the connection string that you used?
[13:59:16] <mrus> I tried connecting using mongodb://user:pass@localhost/?authSource=admin&slaveOk=true
[13:59:30] <mrus> (localhost is an ssh tunnel towards the secondary)
[13:59:43] <Derick> what does show up in the secondary's log?
[13:59:58] <Derick> (url looks good)
[14:00:13] <mrus> Good question! Let me check that and get back in a moment..
[14:06:07] <mrus> Hm. It only says " [listener] connection accepted from 10.1.2.79:39258 #39 (20 connections now open)" and "[conn39] end connection 10.1.2.79:39258 (19 connections now open)" right after.
[14:06:27] <Derick> so, it makes a connection
[14:06:30] <mrus> yup
[14:06:41] <Derick> does the Go driver have a logging mode to tell you why it failed?
[14:07:19] <mrus> not sure, the documentation on mongodb's official go driver is not the best, frankly speaking
[14:07:27] <mrus> let me check
[14:07:35] <Derick> well, it's not released yet as a GA release
[14:29:09] <mrus> Derick: I haven't found out how to get more debug output from the driver, but I found out that adding options.Client().SetSingle(true) helped with the connection issue
[14:29:20] <mrus> thanks!
[14:29:32] <Derick> ah
[14:29:41] <Derick> so they did it with a new setting
[14:29:52] <mrus> apparently
[14:29:55] <Derick> mrus: I'd file a quick bug report though, as that's not really how it is expected to work
[14:30:44] <mrus> you mean, the driver should be able to connect even without that option?
[14:38:41] <Derick> yes, I think so
[14:38:56] <Derick> for example, the PHP driver (and C driveR) allow to connect to a secondary without a specific setting
[14:39:15] <Derick> just connecting to a host, setslaveok (or equivalent) and *not* having replSet=name, is enough
[14:44:05] <mrus> I see. I'll open a bug on GitHub, thank you!
[14:46:28] <Derick> github, or : https://jira.mongodb.org/projects/GODRIVER is probably better
[22:18:14] <NaN> does .find() acts like $and, by default, or it acts like $or?