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 wait() calls publish during the wait cycle #1758

ian-otto opened this issue Nov 21, 2018 · 2 comments
Closed wait() calls publish during the wait cycle #1758

ian-otto opened this issue Nov 21, 2018 · 2 comments


Copy link

@ian-otto ian-otto commented Nov 21, 2018

I'm submitting a ...

  • bug report
  • feature request
  • question about the decisions made in the repository

Do you want to request a feature or report a bug?

I'm reporting a bug.

What is the current behavior?

CherryPy server started through wspbus consumes 100% of a core during idle. I resolved this by moving the publish line from within the while loop to after the while loop, in which the server now idles while not serving requests.

If the current behavior is a bug, please provide the steps to reproduce and if possible a screenshots and logs of the problem. If you can, show us your code.

I noticed it when installing and running wok, which uses cherrypy as its backend. Just install this software, start the daemon, then visit the page once and watch the CPU usage for the main process shoot to 100%. I imagine a minimal version of this using a basic "quickstart"-like python script would also exhibit the same behavior.

What is the expected behavior?

The server utilizes minimal CPU usage when not serving requests.

What is the motivation / use case for changing the behavior?

The service should not consume CPU when it isn't doing anything.

Please tell us about your environment:

  • Cheroot version: 6.5.2
  • CherryPy version: 11.2.0
  • Python version: 2.7.15rc1
  • OS: Ubuntu 18.04
  • Browser: [all]

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, e.g. stackoverflow, gitter, etc.)

@webknjaz webknjaz added the bug label Nov 21, 2018
Copy link

@webknjaz webknjaz commented Nov 21, 2018

Sounds like a bug to me. Feel free to send a PR :)

Copy link

@webknjaz webknjaz commented Dec 24, 2018

Fixed by #1759

@webknjaz webknjaz closed this Dec 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants