<p>I am getting this error in the logs.
<code>[error] 117#117: *16706 upstream timed out (110: Operation timed out) while reading response header from upstream</code>.I have tried every possible way to check from where i am getting this exact 60s timeout.</p>
<p>I'll add more detail of how i am producing this error in details also (if needed). I don't see any timeout when I run the dotnet api (dockerized) locally.
That API runs for more then 5 minutes but here in AKS cluster it gets timeout in exactly 60s.</p>
<p>So i am using these headers in my config map (for nginx ingress controller).I have checked it by removing and adding these headers one by one but no change in that timeout.</p>
<pre><code>  client-header-timeout: &quot;7200&quot;
  keep-alive: &quot;300&quot;
  keep-alive-requests: &quot;100000&quot;
  keepalive-timeout: &quot;300&quot;
  proxy-connect-timeout: &quot;7200&quot;
  proxy-read-timeout: &quot;7200&quot;
  proxy-send-timeout: &quot;7200&quot;
  upstream-keepalive-requests: &quot;100000&quot;
  upstream-keepalive-timeout: &quot;7200&quot;
</code></pre>
<p>And i have also tried adding these headers in my ingress resource/rule for that microservice.</p>
<pre><code>nginx.ingress.kubernetes.io/client-body-timeout: &quot;7200&quot;
    nginx.ingress.kubernetes.io/client-header-timeout: &quot;7200&quot;
    nginx.ingress.kubernetes.io/client-max-body-size: 5000m
    nginx.ingress.kubernetes.io/keep-alive: &quot;300&quot;
    nginx.ingress.kubernetes.io/keepalive-timeout: &quot;300&quot;
    nginx.ingress.kubernetes.io/large-client-header-buffers: 64 128k
    nginx.ingress.kubernetes.io/proxy-body-size: 5000m
    nginx.ingress.kubernetes.io/proxy-buffer-size: 16k
    nginx.ingress.kubernetes.io/proxy-connect-timeout: &quot;7200&quot;
    nginx.ingress.kubernetes.io/proxy-next-upstream-timeout: &quot;7200&quot;
    nginx.ingress.kubernetes.io/proxy-read-timeout: &quot;7200&quot;
    nginx.ingress.kubernetes.io/proxy-send-timeout: &quot;7200&quot;
    nginx.ingress.kubernetes.io/rewrite-target: /
    nginx.ingress.kubernetes.io/send_timeout: &quot;7200&quot;
</code></pre>
<p>Nginx ingress controller version:</p>
<pre><code>  Release:       v1.0.5
  Build:         7ce96cbcf668f94a0d1ee0a674e96002948bff6f
  Repository:    https://github.com/kubernetes/ingress-nginx
  nginx version: nginx/1.19.9
</code></pre>
<p>We are using Azure Kubernetes cluster and The core dns is resovling all the api/url from an active directory which is deployed in an Azure windows Virtual machine.</p>
<p>Backend API in in dotnet core <code>(sdk:6.0.400 and ASP.NET core Runtime 6.0.8)</code> (all the keepalives and request-timeouts settings are already tested that are defined in the code).</p>

basit khan
<p>Found the problem. May be i have missed something but seems these</p>
<pre><code>proxy-read-timeout: &quot;7200&quot;
proxy-send-timeout: &quot;7200&quot;
</code></pre>
<p>headers doesn't effect the timeouts for the backend GRPC communication.
I had to add the &quot;server-snippet&quot; to add these</p>
<pre><code>grpc_read_timeout 120s; grpc_send_timeout 120s; client_body_timeout 120s;
</code></pre>
