<p>Im running deployments on GKE,</p>

<p>using <code>quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.12.0</code> image as  nginx-ingress-controller</p>

<p>Im trying to increase <code>proxy_send_timeout</code> and <code>proxy_read_timeout</code> following to this <a href="https://github.com/kubernetes/ingress-nginx/blob/nginx-0.12.0/docs/user-guide/annotations.md" rel="noreferrer">link</a></p>

<p>here is my ingress config:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: nginx-ingress
  namespace: production
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "360s"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "360s"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "360s"
    nginx.ingress.kubernetes.io/proxy-body-size: 100m
    nginx.ingress.kubernetes.io/client-body-buffer-size: 100m
spec:
  rules:
  - host: app.my.com
    http:
      paths:
      - backend:
          serviceName: front-app
          servicePort: 80
  - host: api.my.com
    http:
      paths:
      - backend:
          serviceName: backend-app
          servicePort: 80
  - host: api.old.com
    http:
      paths:
      - backend:
          serviceName: backend-app
          servicePort: 80
  tls:
  - hosts:
    - app.my.com
    - api.my.com
    secretName: tls-secret-my-com
  - hosts:
    - api.old.com
    secretName: tls-secret-old-com
</code></pre>

<p>still this does not change the <code>proxy_send_timeout</code> and <code>proxy_read_timeout</code></p>

<p>requests which take longer than 60s (default nginx timeout) are closed</p>

<p>I see this log:</p>

<pre><code>[error] 20967#20967: * upstream prematurely closed connection while reading response header from upstream, client: 123.456.789.12, server: api.my.com, request: "GET /v1/example HTTP/2.0", upstream: "http://11.22.3.44:4000/v3/example", host: "api.my.com", referrer: "https://app.my.com/"
</code></pre>

<p>when I go into the nginx pod:</p>

<pre><code>&gt; kubectl exec -it nginx-ingress-controller-xxxx-yyyy -n ingress-nginx -- bash
&gt; cat /etc/nginx/nginx.conf
</code></pre>

<p>output:</p>

<pre><code>server {
    server_name _ ;

    listen 80 default_server  backlog=511;
    location / {
        # Custom headers to proxied server

        proxy_connect_timeout                   5s;
        proxy_send_timeout                      60s;
        proxy_read_timeout                      60s;
</code></pre>

<p><code>proxy_send_timeout</code> and <code>proxy_read_timeout</code> are set to <code>60s</code> and not <code>360s</code> as I configured on the ingress</p>

<p>so I tried changing manually the timeout on <code>nginx</code> conf, and then I did not get the timeout on the client, but every time the nginx is restarted the values are returned to the default <code>60s</code></p>

<p>how can I configure currectly the timeouts on the ingress? </p>

dina
<p>Based on :<a href="https://github.com/kubernetes/ingress-nginx/issues/2007" rel="noreferrer">https://github.com/kubernetes/ingress-nginx/issues/2007</a></p>

<p>Try to change the value in the annotation to '360'. The value needs to be a number. </p>
