-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Coroutines high CPU consuming v1.3.3 #1833
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
Comments
Thanks for the report. |
Hello. I can not share my code because it is not in public domain. I use
Each tasks use ktor client to fetch some data from different rest endpoints
As a result after unpredictable time after application launch it start consume 100% of CPU Probably, but not sure. It takes much more time till 100% CPU if I use I was able to catch 100% CPU in profiler And here is thread dump |
Probably related ktorio/ktor#1018 |
Well. Looks like it was not coroutines issue. It is mostly like Apache client for Ktor issue. When I'd change ktor client implementation I was not have any 100% CPU spikes. But there was one interesting thing - some king of correlation between coroutine delay vs thread.sleep loop in main thread which somehow affects CPU spike appearance time. |
@rumatoest Can you confirm if this was related to ktorio/ktor#1018 ? Was HTTPS involved for example, and did you try the fix of upgrading apache client listed there? |
Well it is definitely was about ktor client implementation. It was related with https because I used it for https based API calls. I've never tried a fix or upgrade because I do not need to right now. Everything work with CIO client without any issues for me. |
Hello my issue is related to #840
I'm using java 11, Kotlin 1.3.60 Coroutines 1.3.3 Ktor 1.3.1
I've struggle with the same CPU consuming issue as in #840 .
Setting system property
kotlinx.coroutines.scheduler
to off fixed CPU issue.Looks like patch related to #840 was published before 1.3.3 release, thus it was not fix this issue completely.
The text was updated successfully, but these errors were encountered: