Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delay new connection in case of exausted files #1004

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

domenkozar
Copy link

Fixes #1003

@domenkozar domenkozar force-pushed the fix-emfile-busy-loop branch 2 times, most recently from 41c96dc to 05fc4f1 Compare September 15, 2024 10:06
@domenkozar
Copy link
Author

cc @kazu-yamamoto

@kazu-yamamoto
Copy link
Contributor

In the case of eMFILE, we should wait for the number of connections decreases using counter (TVar Int) as @nh2 suggested. (It seems to me that the delay approach is ad-hoc.)

@nh2 I don't understand what we should do for the case of eCONNABORTED yet. In my understanding, accept throws eCONNABORTED when the creation of a new connection fails. We can use the listen socket safely again. Is the current code good enough for the case of eCONNABORTED?

@domenkozar
Copy link
Author

Note that number of open files might not just depend on warp, but it can also be due to other things running in the same space.

Either way, I'm happy as long as it doesn't busy-loop or just crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

busy loop on too many open files
2 participants