Comments (3)
This only effects the httptoolstransport
. The easiest fix is to set shutdown_wait_period
, and shutdown_grace_period
(when HTTPTransport is initialized) to 0. Shutdown will then take 0 seconds.
shutdown_wait_period is the time to wait after getting a shutdown signal before actually shutting down.
shutdown_grace_period is the time to wait for connections to be empty before shutting down.
(both in seconds)
I need to work on a better fix for this, but its looking a little bigger than I hopped. So those should help for now.
An even better fix, is that setting the app to debug
should eliminate all graceful shutdowns. Also, the defaults for these values should probably prefer local dev, and allow prod to set them higher.
The history for this is that in kubernetes, there is a race condition where your service gets a shutdown before its taken out of the load balancer. These setting allow you to tweek things, so that your service gets shutdown after connections actually stop, thus preventing service disruption during a rolling deploy. However, I have found that this can be solved in other ways, so I need to experiment removing these values now.
from waspy.
could we autodetect if we are in a k8s environment and set them to a minimum such as the current setting? and default them to 0 seconds? I think a good setting for now too is whether DEBUG is True or not.
from waspy.
Closing this, as DEBUG
now makes it shut down instantly
from waspy.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from waspy.