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

High CPU usage in sbt interactive mode after exiting console #58

Closed
n8han opened this issue May 22, 2013 · 3 comments
Closed

High CPU usage in sbt interactive mode after exiting console #58

n8han opened this issue May 22, 2013 · 3 comments

Comments

@n8han
Copy link

n8han commented May 22, 2013

First identified on the mailing list:
https://groups.google.com/forum/?fromgroups#!topic/dispatch-scala/CEZg9H32kX8

As far as I can tell this would have no effect on a production environment, but it's very annoying in dev.

@n8han
Copy link
Author

n8han commented May 22, 2013

First finding, if I disable daemon threads completely we fail to return to sbt interactive mode, as expected, but I am not seeing high CPU usage in that case. So it seems to have something to do with the daemon threads being killed.

@n8han
Copy link
Author

n8han commented May 22, 2013

Okay! Latest test indicates that calling nioClientSocketChannelFactory.releaseExternalResources before leaving the console avoids the issue. This is called normally by client.close(), but not if you specify your own factory -- as we have done. Also we don't want to call close().

Next step is to see if we can release automatically.

@n8han
Copy link
Author

n8han commented May 24, 2013

this is fixed by the last few commits to master

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

No branches or pull requests

1 participant