Skip to content

SIGTERM ignored - we should handle it #215

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

Closed
consideRatio opened this issue Nov 11, 2019 · 0 comments · Fixed by #217
Closed

SIGTERM ignored - we should handle it #215

consideRatio opened this issue Nov 11, 2019 · 0 comments · Fixed by #217

Comments

@consideRatio
Copy link
Member

consideRatio commented Nov 11, 2019

If this can run in less than 10 seconds, this issue is resolved.

docker build -t chp:latest . && \
echo "Starting..." && CONTAINER_ID=$(docker run -d chp:latest) && \
echo "Giving it time to startup..." && sleep 5 && \
echo "Stopping! Does this take less than 10 seconds?" && \
docker stop -t 10 $CONTAINER_ID

The reason this is an issue I care about, is because in k8s it takes 30 seconds we wait 30 seconds and then send SIGKILL to the first process. So if we make an upgrade to the proxy pod, we need to wait 30 seconds typically for it to actually terminate. We can make this be 0 seconds, but then we don't exit very nicely, so perhaps we could instead do like we do for SIGINT?

// trigger normal exit on sigint
// without this, PID cleanup won't fire on SIGINT
process.on("SIGINT", function() {
log.warn("Interrupted");
process.exit(2);
});

This issue relates to jupyterhub/zero-to-jupyterhub-k8s#1476.

I'll submit a PR!

consideRatio added a commit to consideRatio/configurable-http-proxy that referenced this issue Nov 11, 2019
Closes jupyterhub#215 by listening for a SIGTERM signal.
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

Successfully merging a pull request may close this issue.

1 participant