You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--reload is a very useful option when debugging and working on an application. However, in some situations (such as running gunicorn inside of a VM or a Docker container on Mac with host mounted directories), the current file polling method can cause high CPU load due to the overhead of dealing with a virtualized filesystem.
Many of these filesystems now have support for the kernel's inotify API which allows applications to monitor for filesytem events instead of polling. This is much less resource intensive and can improve CPU usage of the Reloader in many situations. It would be nice to either have gunicorn support inotify by default (on supporting platforms) or via an extra argument.
Can you send us a PR? Looking at your patch I would prefer to set it by augmenting the current setting: --reload=inotify . So we don't introduce another setting.
@benoitc I hope I'm not being a bother, but I wanted to follow-up on a release containing this version. Is there any way that I can get my hands dirty and help move us towards a release?
Activity
Fix benoitc#1368 by adding 'use-inotify' configuration option
Fix benoitc#1368 by adding 'use-inotify' configuration option
Fix benoitc#1368 by adding 'use-inotify' configuration option
Fix benoitc#1368 by adding InotifyReloader and 'use-inotify' configur…
benoitc commentedon Oct 16, 2016
good idea :)
Can you send us a PR? Looking at your patch I would prefer to set it by augmenting the current setting:
--reload=inotify. So we don't introduce another setting.Fix benoitc#1368 by adding InotifyReloader and 'use-inotify' configur…
Fix benoitc#1368 by adding InotifyReloader and 'use-inotify' configur…
elliotbay22 commentedon Nov 4, 2016
Hey, I just happened upon this as something I'd like for my development flow too. When should I expect this will be available on pip?
mark-adams commentedon Dec 8, 2016
Just wanted to follow-up @benoitc, do you have an estimate on when the next gunicorn release will happen that will include these changes?
benoitc commentedon Dec 10, 2016
@mark-adams there is 1-2 patch to add to this release but there is no reason it can't be done next week.
elliotbay22 commentedon Jan 13, 2017
Ping! I keep finding that this would be useful to me, but I'd rather not cut myself off from pip to patch the implementation myself.
mark-adams commentedon Jan 19, 2017
@benoitc I hope I'm not being a bother, but I wanted to follow-up on a release containing this version. Is there any way that I can get my hands dirty and help move us towards a release?
berkerpeksag commentedon Jan 19, 2017
@mark-adams I think #1422 is the only blocker for a new release at the moment. You could help us to review #1430 :)
mark-adams commentedon Jan 19, 2017
Just left a comment. Thanks @berkerpeksag
Fix benoitc#1368 by adding InotifyReloader and 'use-inotify' configur…