[SERVER-3707] Don't try to accept() if out of fds Created: 29/Aug/11  Updated: 11/Jul/16  Resolved: 29/Aug/11

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

Type: Improvement Priority: Major - P3
Reporter: Mathias Stearn Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-3705 mongos not closing connections, filli... Closed
related to SERVER-3708 Create a BackgroundJob that tracks av... Closed
Participants:

 Description   

I think we basically infinite loop trying to accept since there will always be an incoming connection ready to be accepted that we can't accept. We should check if there is an available fd, and issue a warning and sleep for a second if not.



 Comments   
Comment by Mathias Stearn [ 29/Aug/11 ]

If it gets backported will need to be custom as we don't have unified listener code in 1.8. Will separate (but identical) fixes for both mongod and mongos.

Comment by auto [ 29/Aug/11 ]

Author:

{u'login': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: Wait a bit before trying to accept() when out of FDs SERVER-3707 SERVER-3705
Branch: master
https://github.com/mongodb/mongo/commit/3fc16f4e36aed091877448e9366b6b0949c686db

Comment by Mathias Stearn [ 29/Aug/11 ]

We could also do this lazily and just sleep for n seconds if accept() fails with EMFILE or ENFILE.

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