[SERVER-9816] inconsistent connection count Created: 30/May/13 Updated: 10/Dec/14 Resolved: 31/May/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Diagnostics |
| Affects Version/s: | 2.2.2 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Minor - P4 |
| Reporter: | sorghum | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | connection | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Red Hat Enterprise Linux Server release 6.3 (Santiago) |
||
| Participants: |
| Description |
|
Executing "mongostat --port 27017" shows the number of connections is 15K,but running "netstat -na | wc -l" to count the connections, the result is only 95. |
| Comments |
| Comment by Scott Hernandez (Inactive) [ 31/May/13 ] | ||
|
I'm glad to hear your production system is stable again. When you setup that test system and create a new issue if you find useful information please make sure to include client details and your connection options (esp. if you set a socket/read timeout as those settings can dramatically affect connections). Also if you have private data please feel free to create a Community Private (SUPPORT) issue so that it is not public. Linking this issue with the new one can be done after you create the new issue by you, or us. | ||
| Comment by sorghum [ 31/May/13 ] | ||
|
db.serverStatus() shows the value of connections.current is closed to the number given by mongostat. tcp 0 0 0.0.0.0:27018 0.0.0.0:* LISTEN ------------------------------- It's a production enviroment, and it works fine now. So I cannot give you the result of currentOp and serverStatus. Right now, I doubt the reason is the "locked db". When the locked percentage is low, the results are consistent. When the percentage is extremely high, the results differ greatly with each other. | ||
| Comment by Scott Hernandez (Inactive) [ 31/May/13 ] | ||
|
On the primary can you run
If you want this info to be private we can move this issue someplace less public. | ||
| Comment by sorghum [ 31/May/13 ] | ||
|
The architecture of mongodb is a replicaset cluster with 3 nodes (primary, secondary,and arbiter) Primary: [root@mongo-online01 ~]# netstat -nat | grep xx.xx.xx.xx:27018 | wc -l -------------------------------------------------------------------------------------------------------------------------------------------------- Secondary: [root@mongo-online02 ~]# netstat -nat | grep yy.yy.yy.yy:27018 | wc -l | ||
| Comment by Scott Hernandez (Inactive) [ 30/May/13 ] | ||
|
Please provide the output of the raw commands. This will allow us to see the current state of the connections reported by netstat and mongostat numbers. Also, please make sure that the connections you are counting with netstat are to port 27017 and not other things. |