[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: |
|
||||||||||||
| 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 |
| 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. |