runserver_plus constantly uses about 30% of one CPU
See original GitHub issueHey there,
I’m really pleased with runserver_plus
but found today that it uses 30% of one CPU (according to top & htop)
When I run strace
on the process, I see thousands of stat
calls. I guess it’s checking all my files (even libraries) for changes.
I’m on Linux – Ubuntu 14.04 “trusty”. Is there any way to enable an alternative to this exhaustive polling on my platform, other than --noreload
?
Thanks! Evan
Issue Analytics
- State:
- Created 9 years ago
- Reactions:1
- Comments:8 (8 by maintainers)
Top Results From Across the Web
RunServerPlus — django-extensions 3.2.1 documentation
To get started we just use the runserver_plus command instead of the normal runserver command: $ python manage.py runserver_plus * Running on ...
Read more >django-extensions Documentation - Read the Docs
This is a handy command to generate a new password which can be used for a user password. This uses Django core's default...
Read more >django development mode runserver --noreload hits 100 ...
i tried on a quad core machine it gets to 30 percent cpu usage too. i guess the runserver is not very effective...
Read more >Best Open Source Django Packages of 2020 - Crowdbotics
It simply uses a regular function-based view if you don't need the more powerful features. It has very good documentation. Django-rest-framework ...
Read more >Django app on production consistently taking up CPU. - Reddit
13 votes, 14 comments. I have been running a production Django application in a virtual machine for 4-5 months now. One thing I...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think I may have answered my own question: The problem lies in
werkzeug
, which once supportedinotify
but no longer does.In the 0.10 release notes, this is the latest mention of
inotify
:http://werkzeug.pocoo.org/docs/0.10/changes/
Thanks a lot trbs.
Passing ‘–reloader-interval N’ works as expected.
as does putting RUNSERVERPLUS_POLLER_RELOADER_INTERVAL = 5 in the settings file.