-
Notifications
You must be signed in to change notification settings - Fork 96
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
Delay needed before calling asyncServerStop()? #31
Comments
Thanks a lot for the report Alan! |
@gergelyke I've pushed a change to my kubeplayground repo to fix a logging statement. I can eliminate those read errors by changing the |
I am looking into this @alanchristensen @gergelyke. |
@JacopoDaeli do you have any update on this one? |
@gergelyke, unfortunately, I did not have time yet to look into this. But I will look into this asap. |
There is a long discussion here. This "lag" is caused by There is no synchronization between the SIGTERM handler and the health check. If I understand correctly, your health check should fail if you receive a SIGTERM signal and should wait a little bit before shutting down. This way, traffic that came into your pod after the SIGTERM will still be handled, see this comment. Some people are using A solution could be to add a flag
|
ah, thanks a lot @peterkuiper for this! I'll put together a PR addressing this |
I tried to use terminus for some projects at work but during an application update some requests were getting dropped.
I was able to fix this by adding a delay before calling asyncServerStop().
Have you guys seen this as well?
I've created https://github.com/alanchristensen/kubeplayground to help you reproduce what I'm seeing.
Once you got the app running, throw some load at it using wrk:
and then run the update script to rebuild the image and deploy it.
In wrk I then see:
The 14 read errors are requests that get dropped. I think what's going on is that Kubernetes will continue to send traffic to a container for a short bit even after it sends the container SIGTERM.
The text was updated successfully, but these errors were encountered: