-
Notifications
You must be signed in to change notification settings - Fork 3
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
100% CPU Consumption #1
Comments
I wrote a go binary for ejabber for exactly the same purpose and had an issue as well with high cpu consumption because auth for loop was processing endlessly. |
Thanks for reporting this. I will have a look tomorrow. |
Hi - did you get chance to look at this? Thanks.. |
I think I solved this by adding a short timer to the listen loop.. please see the thread on Stackoverflow: https://stackoverflow.com/questions/49540585/excessive-cpu-usage-on-golang-stdin-loop |
@richp10 thanks, can you submit a PR ? |
Yup will do.. |
Firstly thanks for this auth package. I have been using it a while with changes only to the isuser and auth methods for my own tweaked database needs.
Only issue is that running top, the program is showing as using 100% of cpu - it's a multi-core machine and I think it is hogging one core. This is happening at steady state, when there are no new authentication events.
My golang knowledge is not sufficient to know whether the authloop was sufficiently expensive to hog the cpu in this way. Any thoughts? Do you have this problem?
The text was updated successfully, but these errors were encountered: