-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Queue Proxy does not exit after draining and server shutdown #12865
Comments
same |
This issue is stale because it has been open for 90 days with no |
This issue or pull request is stale because it has been open for 90 days with no activity. This bot triages issues and PRs according to the following rules:
You can:
/lifecycle stale |
This issue is stale because it has been open for 90 days with no |
Following up here - after the queue proxy finishes drain - Kubernetes will send a TERM signal to the The shutdown will be blocked if your applicaiton doesn't perform a graceful shutdown. As an example this python server doesn't have a graceful shutdown apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: my-test
spec:
template:
spec:
timeoutSeconds: 150
containers:
- image: python:3.9-slim
command: ["python"]
args: ["-m", "http.server", "8080"] in contrast to nginx which does perform a graceful shutdown apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: my-test
spec:
template:
spec:
timeoutSeconds: 150
containers:
- image: nginx
ports:
- containerPort: 80 |
Also the queue proxy has a 30s drain time - if a request arrives the drain time is reset |
We're experiencing the same problem with a Is there a "canonical" way to address this issue? Thank you |
I'm not familiar with python enough - but generally user applications will want to listen to SIGTERM and perform a graceful exit. I wouldn't feel comfortable for Knative to try to force quit the user container to exist since there could be important things that occur on shutdown. |
For anyone dealing with this issue in Python, try using |
@danielrubin1989: You can't reopen an issue/PR unless you authored it or you are a collaborator. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What version of Knative?
Expected Behavior
When a pod is deleted, queue-proxy should drain the connections and then exit, and after that the user container should exit.
Actual Behavior
When a pod is deleted, queue-proxy drains the connections and shut down the server and prints
Shutdown complete, exiting...
in the logs. However, it does not exit and is killed by kubelet afterdeletionGracePeriodSeconds
(300s).Steps to Reproduce the Problem
Setup
The text was updated successfully, but these errors were encountered: