[SERVER-18428] Clients read from hidden secondary Created: 12/May/15  Updated: 13/May/15  Resolved: 13/May/15

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: 2.6.8
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Elad Moshe Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2015-05-12 at 11.59.06.png     PNG File Screen Shot 2015-05-12 at 12.00.44.png    
Operating System: ALL
Participants:

 Description   

I have a replica set (primary, secondary, hidden). In MMS, I see that after few days that the hidden member had 5 connections, suddenly the number of connection jumps to around 600, similar to the number of connections that the primary and secondary have. This happened twice. Last time after restarting the hidden member machine the connections count returned to 5.

In my node.js mongo driver log the following line begins appears after the number of connections increased:
"picked server [hidden hostname]".

Here is my configuration:

rs.rs1:PRIMARY
rs.conf()
{
	"_id" : "rs1",
	"version" : 2,
	"members" : [
		{
			"_id" : 0,
			"host" : "[primary hostname]:27017"
		},
		{
			"_id" : 1,
			"host" : "[hidden hostname]:27017",
			"priority" : 0,
			"hidden" : true
		},
		{
			"_id" : 2,
			"host" : "[secondary hostname]:27017",
			"priority" : 0.5
		}
	]
}



 Comments   
Comment by Sam Kleinman (Inactive) [ 13/May/15 ]

I'm going to go ahead and close this ticket: if there's an issue here, as Christian said, you should open an issue in the NODE driver.
The SERVER project is for reporting bugs or feature suggestions for the MongoDB server.
For MongoDB-related support discussion please post on the mongodb-users group
or Stack Overflow with the mongodb tag.
A question like this involving more discussion would be best posted on the mongodb-users group.

Comment by Christian Amor Kvalheim [ 12/May/15 ]

There is no reason why the 1.4.x branch should send a read to the 'passive' node. That said I suggest upgrading to the latest 1.4.x release to get all the bug fixes and compatibility fixes for 3.0 so you avoid running into any surprise issues. If you still see this issue please open a NODE project ticket and I will investigate it.

We do recommend you move to the 2.0.x branch when possible as we have moved to a shared monitoring and server selection specification across drivers to ensure driver have the same behavior when talking to replica sets.

Comment by Elad Moshe [ 12/May/15 ]

1.4.19

Comment by Christian Amor Kvalheim [ 12/May/15 ]

what version of the driver are you using ?

Comment by Elad Moshe [ 12/May/15 ]

I have noticed that the node.js driver mongodb connection string has the hidden member listed as part of the servers list. Trying now to see if removing it from the list solves the issue.

Generated at Thu Feb 08 03:47:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.