-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
proxy timeout annotations have no effect on nginx #2007
Comments
I have the same issue with |
My particular test uses Ingress config (I needed timeouts only, but added other just for the test case):
```
- apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: che-ingress
annotations:
ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/proxy-connect-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/upstream-fail-timeout: "30"
nginx.ingress.kubernetes.io/add-base-url: "true"
nginx.ingress.kubernetes.io/affinity: "cookie"
spec:
rules:
- host: 192.168.99.100.nip.io
http:
paths:
- backend:
serviceName: che-host
servicePort: 8080
```
Which generates upstream:
And server:
So looks like none of the annotations take effect. |
I don't get the point, annotations were tested one by one and |
The hyphens are not the normal hyphens - but just look like them. What @akaGelo is trying to say is that if you use your browsers search option and put in a |
Oh now that's seems very obvious ! Thanks guys, that was a pretty simple mistake. I'll look into official documentation if we can improve that with the same type of character for working copy/paste. @garagatyi Maybe you have the same problem ? You should also update your ingress revision. |
@gooodmorningopenstack I have older nginx controller, not wrong characters. The thing is I can't control the version of the controller, so I have to allow users to redefine controller annotations (it can be even not nginx controller at all). But thanks for your suggestion! |
I'm having the same issue. Unlike the author one, my ingress doesn't have any special hyphen.
|
I ran into this as well. I'm assuming an integer is required for timeouts? I was using "5m" because Nginx docs seemed to show that I could. Changed to 300 and things worked great after that. |
I had the same problem and discovered that the following do not work: nginx.ingress.kubernetes.io/proxy‑read‑timeout: 1800 What does work is: nginx.ingress.kubernetes.io/proxy‑read‑timeout: "1800" |
@gae123 that's not working for me apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: my-app
namespace: my-app
annotations:
nginx.org/websocket-services: "my-app"
nginx.ingress.kubernetes.io/proxy-connect-timeout: "14400"
nginx.ingress.kubernetes.io/proxy-send-timeout: "14400"
nginx.ingress.kubernetes.io/proxy-read-timeout: "14400"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
kubernetes.io/tls-acme: "true"
kubernetes.io/ingress.class: "gce"
spec: ... still getting timed out after 30s
|
I seem you are using the GCE ingress controller. This annotation only works in nginx |
For me this is not working. Anyone sees an issue?
|
+1
|
After way to much trial and error and frustration; some tips that might work for others who end up here:
|
@Tim-Schwalbe I am using the helm chart as well, although a different version. It only worked with ConfigMaps. Here are the steps that helped me. You need the name of the pod running the controller. Make sure you're running images from quay.io Determine the name of the ConfigMap it reads all those properties from: That means it reads from from a ConfigMap with name
Properties you can add to the ConfigMap compiled in the table here: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/configmap.md The result in /etc/nginx/nginx.conf I hope that was helpful. |
Hi, This is another nginx and the documentation says its setting also the timeout for grpc. But here I can not find any word about grpc. is this just not implemented? |
I had to use the string version instead of the number version, any idea why this is? This breaks:
This works:
|
@yivo you're missing the beginning of the annotation, you need so instead of
you should have
|
From the first tip in the docs https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/
|
@aledbf Oh, how weird is that. Thanks. |
Bumping this: we hit a worse version of this problem when moving from 1.12.1 to 1.12.4. Apparently now if you have these invalid values (not specified as strings) all of your annotations are discarded. Seems like 'kubectl apply' with invalid annotations shouldn't silently accept and discard these values. |
I had this problem on 0.18, upgrading to latest fixed it using "normal" annotations ( |
what is the approved solution for this.. for me also its same.. its getting CLIENT_DISCONNECTED exactly in 60sec, I have tried all options mentioned in this forum but not working.. any solid clue to get it fixed? |
To turn this around: is anyone actually able to have something communicate across a kubernetes cluster boundary with >60s idle time between packets? Perhaps using something else than nginx? |
After adding nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" Proxy Error Reason: Error reading from remote server Using a reverse proxy to connect to api on a apache server image hosted on K8s cluster. |
Any updates on when this might be fixed, or a version that it is patched in? I've also tried everything, running version 0.20.0 and having no luck. |
@dannyburke1 solution described in #2007 (comment) is working fine in current release |
Hey @kvaps thanks for your response. When copying/pasting that (in vim) and applying it says that it can't be applied due the hyphens being used:
If I replace the hyphens then I can apply it, but unfortunately isn't being filtered down to the |
I'm seeing nginx connections resets at the exact 60s mark with the ingress-nginx controller. Using the following annotations on the grpc service.
ngnix-ingress ConfigMap
I'm setting up a bidirectional grpc stream It looks like nginx is doing the connection reset by looking at nbl metrics |
I'm not sure on the exact fix here, but seemingly redeploying the ingress and updating nginx seems to have sorted it for me. |
Adding client_body_timeout was the key fix for me here. This needs to be put in the documentation somewhere since it was hard to find
|
@jontro |
How to set the timeouts in a millisecond format? |
@bzon it is already milli format |
I assume many people had the same issue that I had. I copy pasted that line somewhere. Probably from the docs. Now, that DASH is NOT a correct dash. My editor draws them the same way. But my terminal doesn't. That's how I noticed. |
I'm really surprised to see that everyone is proposing solutions but their is not single final solution proposed and used by everyone. Why is it such a mess with ngnix? 504 error is just bugging us alot as well |
@seyal84 could you figure out your issue? I am at the exact same situation atm. |
any updates??? |
Okay so this: nginx.ingress.kubernetes.io/proxy-connect-timeout: "600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
nginx.ingress.kubernetes.io/proxy-next-upstream-timeout: "600" works but only after restarting the complete nginx controller deployment! It is somehow not picking up on ingress change! Seems like a bug to me. I used k9s to shell into the pod and executed: cat /etc/nginx/nginx.conf | grep proxy_.*_timeout |
What's the meaning of Do you mean I have to delete the helm chart
I try to update the helm list and restart its port, mine is still the default value kk exec -ti ingress-nginx-controller-7d5fb757db-f66kp -- bash
bash-5.1$ cat /etc/nginx/nginx.conf | grep proxy_.*_timeout|sort -u
proxy_connect_timeout 5s;
proxy_next_upstream_timeout 0;
proxy_read_timeout 60s;
proxy_send_timeout 60s; and we need different setting for different applications, but they using same |
NGINX Ingress controller version: 0.10.2 / quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.10.2
Kubernetes version (use
kubectl version
):Environment:
uname -a
): 4.9.0-5-amd64 Basic structure #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64 GNU/LinuxWhat happened:
NGINX Ingress Controller v0.10.2 configuration doesn't reflect the proxy timeout annotations per Ingress.
This Ingress definition doesn't work as expected :
The actual vhost :
What you expected to happen:
The wanted vhost :
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know:
The text was updated successfully, but these errors were encountered: