Skip to content
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

Reload takes > 60 seconds #1353

Closed
dmitrybelyakov opened this issue Feb 19, 2015 · 2 comments
Closed

Reload takes > 60 seconds #1353

dmitrybelyakov opened this issue Feb 19, 2015 · 2 comments

Comments

@dmitrybelyakov
Copy link

Hi everyone!

Since I updated werkzeug to 0.10.1 this morning reloader stopped working. Is any specific configuration required besides installing watchdog?

I run with:

run_simple(
        hostname='0.0.0.0',
        port=5000,
        application=app,
        use_reloader=True,
        use_debugger=True,
        reloader_type='watchdog'
    )

# * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
# * Restarting with inotify reloader

I'm under vagrant and tried both with and without NFS to no success.

@dmitrybelyakov dmitrybelyakov changed the title No reload happening since werkzeug 0.10.1 Reload takes > 60 seconds Feb 20, 2015
@dmitrybelyakov
Copy link
Author

Ok, I did some research and can say that reload is actually happening. The thing is that watchdog-reload won't work under vagrant, virtualbox, and probably docker as well. This is not the reloader's fault, just how the underlying inotify works.

For reload to work under guest os you need to use stat reloader. It actually takes about 90 seconds to do a single reload with stat reloader consuming 123% of CPU. That is for us and our project. The exact response time and CPU will depend on the number of files in your project.

There is this pull request pallets/werkzeug#669 that will allow you to regulate what files are being watched. Not yet on PyPi though.

Right now we are rolling or own reload solution will werkzeug master and poke.

@untitaker
Copy link
Contributor

Please continue in pallets/werkzeug#682, we did some major changes to the reloader which could have caused serious regressions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants