High idle CPU usage with Django Channels WebSockets (asyncio._run_once / await_many_dispatch hot
#2203
Replies: 1 comment 1 reply
-
|
@JaeHyuckSa Please don't cross post. This is a duplicate of your issue on the Forum. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm using Django Channels for WebSocket connections and I'm seeing what looks like
a CPU bottleneck in the event loop / Channels dispatch layer, even when the
connections are basically idle.
Environment
Symptom
When I just keep WebSocket connections open (no heavy messages being sent),
the CPU usage of a single worker process keeps growing over time.
Roughly speaking, CPU usage increases by about
0.1% per secondfor that worker,even though the app is not doing any significant work at the application level.
To understand what’s going on, I profiled the process and got this summary
(only the top part is shown here):
Beta Was this translation helpful? Give feedback.
All reactions