question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hot idling when in subthread (runserver)

See original GitHub issue

When Daphne is embedded as a subthread inside something else (such as channels’ runserver) it idles very hot, using a full CPU core on my machine, even with a Twisted-native ASGI backend.

It looks like the Twisted reactor might be the cause, but can’t be sure yet.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
andrewgodwincommented, Feb 23, 2017

It’s partially a problem with the synchronous polling, yes - I’m working on fixing that soon. It’s also something else, though, because calling epoll 100 times a second should not cause a lot of load. If you look at the output from @cbay you can see it’s polling far more than it’s talking to Redis.

I’m not sure why this is, but I need to sit down and sort this out, make IPC more efficient, and probably redesign the way daphne handles socket listening entirely.

0reactions
andrewgodwincommented, Feb 2, 2018

Hot idling is gone with daphne 2 as it’s all asyncio now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reasons a Car Overheats in Stop & Go Traffic - Capitol Subaru
Excessive heat can destroy the engine of a car, so overheating is a very bad ... begin to get too hot when the...
Read more >
5 Reasons Why Your Car Is Overheating On Idle
Faulty Cooling System​​ One common reason engines overheat while idling is a faulty or broken cooling system. This could include problems with ...
Read more >
3 Reasons Your Car Overheats When Idling
If the heat isn't being effectively removed by the cooling system, the engine can suffer major damage. Generally, an overheating engine can ...
Read more >
3 Reasons Your Car Overheats, But Only When Idling
It could even cause your engine to run too hot when sitting at a light or idling away in a drive-through line.
Read more >
Overheating at idle in hot weather - ThirdGen.Org
On the move the car runs on the lower 1/4 way mark on the temp gauge and the air dam is intact. All...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found