-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[question] High CPU load on dial #603
Comments
Hello~ Can you provide detailed codes and error information? |
Is other code concurrently accessing |
It's very possible that the issue here is related to the infinite loop in time.Sleep; there is a known issue that both time.Sleep and time.Ticker can result in high CPU usage, golang/go#27707 If you check the comments this has been at least partially addressed for time.Ticker but not time.Sleep. So I'd recommend the following:
|
@l4zygreed Did you run the application with the race detector and fix and reported problems? Is the goroutine that calls |
While testing my code for websocket recreation to server, I noticed that when I dial to the server which is offline
the Dial function cause CPU ~100% load until connection or timeout.
Can I somehow decrease CPU load when dial?
Versions
The text was updated successfully, but these errors were encountered: