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

Provide a safe-shutdown method, to avoid resource warnings #118

Open
whaleygeek opened this issue Aug 22, 2019 · 1 comment
Open

Provide a safe-shutdown method, to avoid resource warnings #118

whaleygeek opened this issue Aug 22, 2019 · 1 comment

Comments

@whaleygeek
Copy link
Owner

It really does depend how you are stopping the web server running. A CTRL-C will likely generate a resource warning (anecdotal evidence here too.... psf/requests#3912) and the PSF guys say 'this is only a warning, don't worry about it').

There is some advice here about how to access the shutdown() method, as I suspect because the web_console is session based (and I use cookies in session to implement the session) that Bottle is using the Requests library internally, which will suffer on an uncontrolled shutdown.

https://stackoverflow.com/questions/11282218/bottle-web-framework-how-to-stop

I'll leave these notes here, next time I do some work on web_console I'll see if I can add a'controlled server shutdown' feature that you can call from a web request (which would allow you to add a button in an admin interface to stop the server remotely, if that is what you want to achieve).

But as the PSF guys say, it's just a warning, it's sort of normal when you pull the plug on a server that is actively serving.

@whaleygeek
Copy link
Owner Author

Original report came from here: #109

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant