Nginx ingress 403; File wasn’t available for large file downloads on EKS

After upgrading Nginx ingress a few times we noticed that downloads with persistent session for files of 2+GB do not work with a 403 error saying that the file is not available. Timeline of after what change exactly it happened. Current version is version 4.10.1 of the helm chart. We come from version 4.4.0 on EKS 1.24 when it worked. Then to version 4.9.1 in version 1.27 and 1.28 of EKS and now 4.10.1 in version 1.28. We just noticed big files downloads were not working on version 4.9.1 and then we then upgraded to 4.10.1 to check if that was it aside from doing a lot of other test changes

Here is the log of the failure in Nginx:

10.1.14.79 - - [30/Apr/2024:03:30:58 +0000] "GET /URI/Archive%204.zip HTTP/1.1" 403 23 "https://sundomain.com/URI/My%20Library/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" 734 0.001 [default-host-domain-com-80] [] 10.1.17.19:80 23 0.001 403 6cd138dda0809e2043dc96bf430dcfec

this is the nginx ingress controller config:

controller:
  config:
    enableSnippetAnnotations: true
    data:
      allow-snippet-annotations: 'true'
      http-snippet: |
        server{
          listen 2443;
          return 308 https://$host$request_uri;
        }
      use-forwarded-headers: 'true'
      map-hash-bucket-size: "256"
      server-name-hash-max-size: "1024"
      types-hash-max-size: "128"

From there is missing parts of the values file that are kind standard. We are on AWS and use NLB and they have just been working, so nothing has changed there.

Then the actual ingress looks like this:

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: app-subdomain-com-ingress
  labels:
    ingress-class: "ingress-class"
  annotations:
    # https://kubernetes.github.io/ingress-nginx/examples/affinity/cookie/
    kubernetes.io/ingress.class: "ingress-class"
    nginx.ingress.kubernetes.io/affinity: cookie
    nginx.ingress.kubernetes.io/affinity-mode: persistent
    nginx.ingress.kubernetes.io/session-cookie-name: "route"
    nginx.ingress.kubernetes.io/session-cookie-expires: "15000"
    nginx.ingress.kubernetes.io/session-cookie-max-age: "15000"
    nginx.ingress.kubernetes.io/session-cookie-change-on-failure: "true"
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "10800"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "10800"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "10800"
    nginx.ingress.kubernetes.io/keep-alive: "250"
    nginx.ingress.kubernetes.io/client-body-timeout: "10800"
    nginx.ingress.kubernetes.io/client-max-body-size: "0"
    nginx.ingress.kubernetes.io/proxy-body-size: "0"
    nginx.ingress.kubernetes.io/proxy-buffering: "off"
    nginx.ingress.kubernetes.io/proxy-max-temp-file-size: "0"
    # nginx.ingress.kubernetes.io/ssl-redirect: "true"
    # nginx.ingress.kubernetes.io/force-ssl-redirect: "false"
    # nginx.ingress.kubernetes.io/client-header-timeout: "120s"
    # nginx.ingress.kubernetes.io/proxy-body-size: "100000m"
    # nginx.ingress.kubernetes.io/proxy-request-buffering: "off"
    # nginx.ingress.kubernetes.io/proxy-buffering: "off"
    # nginx.ingress.kubernetes.io/load-balance: "least_time"
spec:
  rules:
  - host: subdomain.com
    http:
      paths:
        - pathType: Prefix
          path: /
          backend:
            service:
              name: app-subdomain-com
              port:
                number: 80

everything else works as expected for instance I can upload a big file no issue, I just cant download on the browser I get the 403 with the message “file wasn’t available on site”. Notice the commented out parts are some of the thing I already tried and did not help too. Also with a regular nginx something like this works as expected:

upstream web {
    server myserver:80;
}

server {

    listen 80;

    location / {
        return 301 https://$host$request_uri;
    }

}

server {
    listen 443 ssl;
    ssl_certificate /etc/letsencrypt/live/site/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/site/privkey.pem;
  
    location / {
        proxy_pass http://web;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $remote_addr;
        
        client_max_body_size 0;
        proxy_connect_timeout  36000s;
        proxy_read_timeout  36000s;
        proxy_send_timeout  36000s;
        send_timeout  36000s;
    }
}

any ideas?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật