0

We have the page which has some of the larger Javascript files. When we hit the page, all the small files get downloaded. However, one of the large files was not downloaded fully and failed with net::ERR_HTTP2_PROTOCOL_ERROR most of the time. We need to open the page using only a VPN connection as it does not open to all.

Just to add, the Nginx ingress controller is used with the following settings for that ingress:

    nginx.ingress.kubernetes.io/configuration-snippet: |
      gzip on;
      gzip_types text/plain text/css image/png application/javascript;
      if ($request_uri ~* \.(js|css|gif|jpeg|png)) {
        expires 1M;
        add_header Cache-Control "public";
      }
    nginx.ingress.kubernetes.io/http2-push-preload: "false"
    nginx.ingress.kubernetes.io/proxy-body-size: 500M
    nginx.ingress.kubernetes.io/proxy-bufferings: "off"
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "36000"
    nginx.ingress.kubernetes.io/proxy-max-temp-file-size: "0"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "36000"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "36000"
    nginx.ingress.kubernetes.io/rewrite-target: /
    nginx.ingress.kubernetes.io/secure-backends: "true"
    nginx.ingress.kubernetes.io/ssl-redirect: "true"

Can we set another annotation in the Nginx ingress or this might be an issue from VPN? I wonder how can we resolve this issue.

DevOps
  • 71
  • 9
  • First I'd check if this is not VPN related for sure (found a machine within the same network and see if the same error occurs). If not possible, it's about guess game. You can see some options in [another SO answer](https://stackoverflow.com/questions/58215104/whats-the-neterr-http2-protocol-error-about) – moonkotte Sep 20 '21 at 11:22
  • @WytrzymałyWiktor I solved this and the answer is marked. – DevOps Sep 23 '21 at 12:41

1 Answers1

1

I solved this by changing the configuration for the Nginx Ingress as following:

data:
  client-max-body-size: 50M
  keep-alive: "3600"
  proxy-buffer-size: 500m
  proxy-buffers-number: "8" 

Glad if this is time-saving for anyone.

DevOps
  • 71
  • 9