[JAVA-3979] Mongo Connection pooling is going beyond the expected limit Created: 01/Feb/21  Updated: 27/Oct/23  Resolved: 22/Feb/21

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Sriram Nalla Assignee: Ross Lawley
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File code.java    

 Description   

I am new to java and Mongo I am trying to set a max pool size of 100

I am running a Load test in localhost I am seeing that the pool is getting re-used without any issues but the max pool size is not following the pool size I have given

for 10k calls there are 300 connections in the pool where I have given only 100

not sure how this is happening

 

 

Attached is the code 



 Comments   
Comment by Backlog - Core Eng Program Management Team [ 22/Feb/21 ]

There hasn't been any recent activity on this ticket, so we're resolving it. Thanks for reaching out! Please feel free to comment on this if you're able to provide more information.

Comment by Ross Lawley [ 08/Feb/21 ]

That would be great - thank you.

Comment by Sriram Nalla [ 08/Feb/21 ]

Hi Ross,

 

I Will share a git link if it's ok but I need to pull the code from the original code and create a sample repo to do that it may take some time will that be ok 

 

Comment by Ross Lawley [ 04/Feb/21 ]

Hi Sriram Nalla,

That doesn't sound right or as expected. Could you provide more detail? A test case to reproduce the error. Ideally, a minimal reproducible example would help as I could replicate the bug and use it as a test case for the fix.

All the best,

Ross

Comment by Sriram Nalla [ 04/Feb/21 ]

I tried with Maxpool size as 10 still its behaving the same way taking 250-300 connections 

Comment by Ross Lawley [ 03/Feb/21 ]

Hi there, thank you for reaching out.

As this sounds like a support issue, I wanted to give you some resources to get this question answered more quickly:

  • Our MongoDB support portal, located at support.mongodb.com
  • Our MongoDB community portal, located here
  • If you are an Atlas customer, there is free support offered 24/7 in the lower right hand corner of the UI

Just in case you have already opened a support case and are not receiving sufficient help, please let me know and I can facilitate escalating your issue.

The number of connections being 3 x max pool size leads me to believe you are querying a 3 node replicaset. Where each node could potentially take up to max pool size.

Thank you!

Ross

Generated at Thu Feb 08 09:00:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.