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

[RPC] Make the port reusable after the socket is closed. #2418

Merged
merged 3 commits into from
Dec 15, 2020

Conversation

zheng-da
Copy link
Collaborator

Description

Currently, when a socket that binds to a port is closed, the socket cannot be reused for a few minutes. This is because the closed socket is in a wait status in the Linux kernel. More details can be found here: https://hea-www.harvard.edu/~fine/Tech/addrinuse.html
The fix is to make the socket reusable after the socket is closed.

Checklist

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented
  • To the my best knowledge, examples are either not affected by this change,
    or have been fixed to be compatible with this change
  • Related issue is referred in this PR

Changes

@zheng-da zheng-da changed the title [Network] Make the port reusable after the socket is closed. [RPC] Make the port reusable after the socket is closed. Dec 15, 2020
@Lyken17
Copy link
Contributor

Lyken17 commented Dec 15, 2020

Tested on >20 runs and the port unreleased problem is fixed. Please merge.

@VoVAllen VoVAllen merged commit 8ff4798 into dmlc:master Dec 15, 2020
@zheng-da zheng-da deleted the fix_sock_reuse branch May 23, 2021 05:36
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.

3 participants