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

[nginx] worker-shutdown-timeout causes issues for request longer than 10s #1373

Closed
Congelli501 opened this issue Sep 15, 2017 · 2 comments
Closed

Comments

@Congelli501
Copy link

Congelli501 commented Sep 15, 2017

I had issues with the nginx ingress controller starting from 0.9-beta.12. Requests lasting more than 10 seconds were closed with a 499 status code in the nginx logs.

In fact, this was caused by the worker-shutdown-timeout config param, which defaults to 10s.

The ingress controller reloads every 3 seconds, and, because of this param, any request lasting more than 10s after a reload will be killed (the worker process will be shut down).
As a result, long running requests were killed after 10s (if the request starts right before a reload) to 13s (if the request starts right after a reload).

This also affects TCP connections (for TCP services, making them completely pointless).

In my opinion, it would be better to completely disable this parameter by default (the default in upstream nginx).

MR causing the problem: #1088 & #1261

@Congelli501 Congelli501 changed the title worker-shutdown-timeout causes issues for request longer than 10s [nginx] worker-shutdown-timeout causes issues for request longer than 10s Sep 15, 2017
@aledbf
Copy link
Member

aledbf commented Sep 15, 2017

Closing. You can set a custom timeout using the key worker-shutdown-timeout in the configuration configmap. We cannot set this to 0 (by default) because this means some workers could live forever. This introduces new issues like hitting cpu and memory limits.

@aledbf aledbf closed this as completed Sep 15, 2017
@aledbf
Copy link
Member

aledbf commented Sep 15, 2017

The ingress controller reloads every 3 seconds, and, because of this param, any request lasting more than 10s after a reload will be killed (the worker process will be shut down).

This is not normal. Please open an issue with the log showing this behavior

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

2 participants