[SERVER-10473] Connection to mongodb database is hanging - need to implement a timeout mechanism Created: 09/Aug/13  Updated: 10/Dec/14  Resolved: 12/Aug/13

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: 2.0.5
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Gabriel Badescu Assignee: David Hows
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 x64, Windows Server 2008 R2


Attachments: File loopback_mongoexe.pcap     Text File mongod.log    
Operating System: Windows
Steps To Reproduce:

Install MongoDb 2.0.5 32bits version on a machine as a windows service.
In an admin console execute this command:
netsh int tcp set global autotuninglevel=experimental
After this, type command: netsh int tcp show
Verify to have "Receive Window Auto-Tuning Level : experimental"
Try to start mongo.exe client without any parameters, to connect to database. Mongo.exe will hang.
You need to implement a timeout algorithm to close the client and to give an appropriate message if no connection can be made.

I attached mongod.log and a capture file to see the packets sent.

Participants:

 Description   

MongoDB it is installed as a windows service an a machine.
The command that I used to install the service is : "C:\Program Files (x86)\Ixia\ResourceManager\Mongodb\bin\mongod.exe" --journal --dbpath "C:\ProgramData\Ixia\ResourceManager\Storage\Database" --logpath "C:\ProgramData\Ixia\ResourceManager\Logs\mongod.log" --service --logappend"

When Windows network setting: "Receive Window Auto-Tuning Level" it is set to "experimental" value, no connections can be made to database using mongo.exe client. Mongo.exe client is hanging.



 Comments   
Comment by David Hows [ 12/Aug/13 ]

Hi Gabriel,

As per Microsoft Technet the experimental level for Window Auto Tuning can "dramatically degrade performance in common scenarios and should only be used for research purposes."

As such, we would never recommend running with this setting. The MongoDB shell will attempt to timeout or close shell sessions which have issues with connectivity. However as there you are making experimental changes to the TCP window length there can be no guarantees.

Given this, I am marking this to resolved.

Regards,
David

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