[SERVER-13848] Investigate potential socket leaks from MongoS Created: 06/May/14  Updated: 06/Dec/22  Resolved: 12/Feb/19

Status: Closed
Project: Core Server
Component/s: Networking, Sharding
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: David Hows Assignee: Backlog - Service Architecture
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Leakin


Issue Links:
Related
Assigned Teams:
Service Arch
Participants:

 Description   

Relates to work done with releaseConnectionAfterResponse


Results from some testing
Under 2.6 we do have some leftover connections, compare:
Pre Test (18 sockets with LSOF)

	"totalAvailable" : 9,
	"totalCreated" : 10,
	"numDBClientConnection" : 10,
	"numAScopedConnection" : 1,
	"ok" : 1

Post test (86 sockets under LSOF)

	"totalAvailable" : 15,
	"totalCreated" : 25,
	"numDBClientConnection" : 84,
	"numAScopedConnection" : 10,
	"ok" : 1

However, under load there are 186 open sockets open during the test.

This shows that connections are being closed by RCAR, but there may also be some leftovers. We need to investigate this.



 Comments   
Comment by Mira Carey [ 12/Feb/19 ]

Given that we've had many successful releases since 2.6, and many long lived processes, I'm going to assume someone would have found an fd leak (as it would eventually hit a ulimit and fassert on a subsequent request for an fd) if we had one.

Connection pool diagnostics is another thing entirely, but isn't a component of this ticket

Comment by Kaloian Manassiev [ 07/Feb/19 ]

We no longer use the old connection pool for CRUD and only for Map/Reduce. Service Arch team to check if this is still a problem.

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