[SERVER-70138] DHandle could not be released after close_idle_time Created: 30/Sep/22  Updated: 21/Oct/22  Resolved: 21/Oct/22

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

Type: Bug Priority: Major - P3
Reporter: qingtao sun Assignee: Yuan Fang
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image.png     PNG File image.png     PNG File image.png     PNG File image.png     PNG File image.png    
Operating System: ALL
Participants:

 Description   

We have environment with many tables. The file open number becomes very high. Even after we stopped any operation, the file open number did not go lower. I set close_idle_time as 10 seconds, the handle should be released after 10 seconds and hence most of the file should be closed



 Comments   
Comment by Yuan Fang [ 21/Oct/22 ]

Hi sunqingtaoca@gmail.com,

Thank you for providing the diagnostic data. Looking at the FTDC, I think the reason for seeing the high active dhandles connections is because the dhandles closed rate is less than the new connection open rate. If I understand correctly, setting close_idle_time as 10 seconds means: file handles need to be idle for 10 seconds before attempting to close it. In other words: connections wouldn't be closed if they kept active. As for the root cause of it, I don't have a certain answer, unfortunately.

Please note that MongoDB 4.0 reached end of life in April 2022 and is no longer supported. Can you please upgrade to MongoDB v4.2+ and see if it solves the issue?

For any further questions in regard to this issue, we'd like to encourage you to start by asking our community for help by posting on the MongoDB Developer Community Forums. If the discussion there leads you to suspect a bug in the MongoDB server, then we'd want to investigate it as a possible bug here in the SERVER project.

Regards,
Yuan

Comment by qingtao sun [ 12/Oct/22 ]

Hello, Yuan Fang

Affected mongodb version: 4.0.28.

log file already uploaded.

Thanks,
Qingtao SUN

Comment by qingtao sun [ 11/Oct/22 ]

Hello, Yuan Fang

I am using mongodb version 4.0.28.

Thanks,
Qingtao SUN

Comment by qingtao sun [ 10/Oct/22 ]

Hello, Yuan Fang

I uploaded the log and diagnostic data on linux successfully. Please help
to check.

Thanks.
Qingtao SUN

Comment by qingtao sun [ 10/Oct/22 ]

I have tried different ways already, here is the screenshot without quote.
[image: image.png]

Comment by Yuan Fang [ 05/Oct/22 ]

Hi sunqingtaoca@gmail.com,

Thank you for providing more information. In regard to the uploading issue, I would suggest you double-check your command by comparing it with the curl snippet provided in the support uploader location. It seems no single quote is required around file=@<filename>, can you try with these removed and see if that works?

And, could you let us know the MongoDB version?

Thanks,
Yuan

Comment by qingtao sun [ 05/Oct/22 ]

Hello,
When I tried to upload the log and diagnostic data, I got the following
error. And I tried different ways to set file name with path, all failed.
Could you please elaborate how to upload files?
[image: image.png]
Thanks
Qingtao

Comment by qingtao sun [ 05/Oct/22 ]

Hello, Yuan Rang

Thanks a lot for looking into this issue. Here is some testing result I got
1. I set close_idle_time as 10 seconds
[image: image.png]
2. Restarted the MongoDB, file open number is 91.
3. Started to query MongoDB, file open number increased till 17166
4. Stopped all queries, the open file number reduced a little bit to 17130,
but stay that number without any change after that
[image: image.png]
5. Checked the MongoDB log, it has been idled for 7 minutes
[image: image.png]
And I will upload the log you requested.

Comment by Yuan Fang [ 30/Sep/22 ]

Hi sunqingtaoca@gmail.com ,

Thank you for reporting this issue. We need additional information to diagnose the problem. Would you please provide:

  • The affected MongoDB version.
  • Archive (tar or zip) the mongod.log files and the $dbpath/diagnostic.data directory (the contents are described here) and upload them to this support uploader location. Files uploaded to this portal are visible only to MongoDB employees and are routinely deleted after some time.

Regards,

Yuan

Generated at Thu Feb 08 06:15:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.