Skip to content

Avoid 100% CPU usage while socket is closed #9

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

Merged
merged 2 commits into from
Jul 31, 2020

Conversation

orange-kao
Copy link

@orange-kao orange-kao commented Jul 23, 2020

After stop/start kafka service, kafka-python may use 100% CPU caused by
busy-retry while the socket was closed. This fix the issue by unregister
the socket if the fd is negative.

@orange-kao orange-kao force-pushed the orange-cpu-usage-while-socket-closed branch 4 times, most recently from 4febe37 to 14a291c Compare July 23, 2020 06:09
@orange-kao orange-kao force-pushed the orange-cpu-usage-while-socket-closed branch 2 times, most recently from c9d61e1 to 16d52f5 Compare July 31, 2020 00:42
@orange-kao orange-kao force-pushed the orange-cpu-usage-while-socket-closed branch from 16d52f5 to cc17a9d Compare July 31, 2020 02:23
@orange-kao
Copy link
Author

Also adding bd557dabd487cc44c11bf003600c82477ea5de11 from upstream, see if the Travis CI can pass.

After stop/start kafka service, kafka-python may use 100% CPU caused by
busy-retry while the socket was closed. This fix the issue by unregister
the socket if the fd is negative.
@orange-kao orange-kao force-pushed the orange-cpu-usage-while-socket-closed branch from cc17a9d to 21b3cb2 Compare July 31, 2020 02:59
@orange-kao
Copy link
Author

One test failed, caused by timeout. Force push to trigger test execution.

@melor melor merged commit b158730 into master Jul 31, 2020
@hackaugusto hackaugusto deleted the orange-cpu-usage-while-socket-closed branch January 11, 2021 11:09
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.

4 participants