[JAVA-2249] Number of connections over max Created: 15/Jul/16 Updated: 20/Mar/19 Resolved: 26/Nov/18 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Connection Management |
| Affects Version/s: | 3.0.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ricardo Ferreira | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Case: | (copied to CRM) |
| Description |
|
The checkedOutCount is bigger then the number of max connections. The used connection never goes below 532 even the system is not in use. |
| Comments |
| Comment by Ian Whalen (Inactive) [ 26/Nov/18 ] | ||||||||||||||||
|
Hey all, unfortunately we've been unable to reproduce this so far so we're resolving as Cannot Repro. Please do comment with any additional info or a reproducer if you are able to and we will reopen and continue working on it. | ||||||||||||||||
| Comment by Oleg Rekutin [ 09/May/17 ] | ||||||||||||||||
|
Still noticing this with 3.3.0. Seeing CheckedOutCount exceed current pool size. | ||||||||||||||||
| Comment by Jeffrey Yemin [ 19/Oct/16 ] | ||||||||||||||||
|
Thanks for letting us know that 3.3.0 does not exhibit the issue reported here. I'm going to close this now but will re-open if it crops up again for you or anyone else. | ||||||||||||||||
| Comment by Ricardo Ferreira [ 19/Oct/16 ] | ||||||||||||||||
|
Hi, We updated to Mongo Driver 3.3.0 and it seems the problem is solved. Thanks for the following up, | ||||||||||||||||
| Comment by Ross Lawley [ 10/Aug/16 ] | ||||||||||||||||
|
Hi rjferreira, I agree with Jeffs comment that:
My working theory is that the size statistic for the connection pool is correct but the number of checkedOutConnections is incorrect as there is some path that is bypassing the checking in of those connections. This is something that may take some time to debug but can be investigated to see if the theory holds true. Regarding your latest comment:
How are you measuring those connections / threads in the waiting state? You mention previously about changes to the replicaSet, have you observed any correlation between the health of the replicaset and the number of connections? There have been fixes regarding the connection pool since 3.0.4. For example Ross | ||||||||||||||||
| Comment by Ricardo Ferreira [ 09/Aug/16 ] | ||||||||||||||||
|
We restarted our server in production and the results are all the same. We have about 300 connections and about 280 threads like this
Do you have any idea how to solve this problem? | ||||||||||||||||
| Comment by Ricardo Ferreira [ 20/Jul/16 ] | ||||||||||||||||
|
Let me give you some tips.
We don't now exactly what happened but we suspected we had problems in the replica set. | ||||||||||||||||
| Comment by Jeffrey Yemin [ 18/Jul/16 ] | ||||||||||||||||
|
This will need more research, as I'm not able to reproduce this with a simple test program:
| ||||||||||||||||
| Comment by Ricardo Ferreira [ 15/Jul/16 ] | ||||||||||||||||
|
We have a mongo in a replica set with three members (primary, secondary, arbiter) Here the MongoClient creation:
Here the connections status in the primary
| ||||||||||||||||
| Comment by Jeffrey Yemin [ 15/Jul/16 ] | ||||||||||||||||
|
Hi Ricardo, Thanks for the report. To help us reproduce this:
Do you see any evidence that there are actually 532 connections open to the server? It's quite possible that this is an accounting bug with the JMX integration, and not a bug in the connection pooling itself. You can track the number of connections open to the server in the shell like this:
|