kubernetes / ingress-nginx

Ingress NGINX Controller for Kubernetes
https://kubernetes.github.io/ingress-nginx/
Apache License 2.0
17.58k stars 8.27k forks source link

Openresty throwing error 413: Request entity too large #11939

Closed bagaderohit closed 2 months ago

bagaderohit commented 2 months ago

What happened:

I am running Nginx-ingress helmchart(Version: 4.10.1) on My OKE Kubernetes cluster(V1.29). I am trying to migrate one object having size 10 MB into the cluster but I am getting 413: Request entity too large error from Openresty.

413 Request Entity Too Large

413 Request Entity Too Large


openresty

I already have passed the proxy-body-size = "100M" in custom values.yaml while deploying the helmchart and it is getting reflected in nginx.conf successfully. Still I am seeing this error. Any suggesting on any openresty config I need to modify.

What you expected to happen:

The payload should have successfully migrated.

NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):

NGINX Ingress controller Release: v1.10.1 Build: 4fb5aac1dd3669daa3a14d9de3e3cdb371b4c518 Repository: https://github.com/kubernetes/ingress-nginx nginx version: nginx/1.25.3


Kubernetes version (use kubectl version): v1.29

Environment:

How to reproduce this issue:

Anything else we need to know:

k8s-ci-robot commented 2 months ago

This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
longwuyuan commented 2 months ago

/remove-kind bug https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#custom-max-body-size

longwuyuan commented 2 months ago

/kind support

longwuyuan commented 2 months ago
% ls -lth file 
-rw-r----- 1 me me 16M Sep  7 01:09 file
[~/Downloads] 

- Tried upload again and it worked

% curl --data-binary "@file" upload.dev.enjoydevops.com -i HTTP/1.1 100 Continue

HTTP/1.1 200 OK Date: Fri, 06 Sep 2024 19:53:32 GMT Content-Type: application/json Transfer-Encoding: chunked Connection: keep-alive

[]%
[~/Downloads] % curl --data-binary "@file" upload.dev.enjoydevops.com/file-uploaded Uploaded succesfully%
[~/Downloads] % curl upload.dev.enjoydevops.com/
["file-uploaded"]%
[~/Downloads]



So I think the annotation is working and there may be some config error on your ingress
longwuyuan commented 2 months ago

@bagaderohit I will close this issue for now as there is not much to analyze your problem.

Please post a detailed and real test from your cluster along with all details like kubectl describe of related resources, the actual curl command used with -v and response, the logs etc etc, if you want to reopen this issue. That way there will be data to analyze and debug.

/close

k8s-ci-robot commented 2 months ago

@longwuyuan: Closing this issue.

In response to [this](https://github.com/kubernetes/ingress-nginx/issues/11939#issuecomment-2334991804): >@bagaderohit I will close this issue for now as there is not much to analyze your problem. > >Please post a detailed and real test from your cluster along with all details like `kubectl describe` of related resources, the actual curl command used with -v and response, the logs etc etc, if you want to reopen this issue. That way there will be data to analyze and debug. > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
bagaderohit commented 2 months ago

HI @longwuyuan! Thanks for taking your time troubleshooting this. However, I have already tested this and the issue I am observing is with the Openresty, please see below:

413 Request Entity Too Large

413 Request Entity Too Large


openresty

I am not able to find any reference documentation on how we can configure parameters for openresty. Anyone has came across similar issue, kindly suggest.

bagaderohit commented 2 months ago

@longwuyuan kindly reopen this issue as it still persists.

longwuyuan commented 2 months ago

@bagaderohit what is not clear is how or why that "openresty" aspect relates to this controller. There is no distinct & direct exposure to users for components like Openresty or Nginx (excepting the snippets feature). Hence I closed because normal way to assume reproduce steps did not show problem.

If you posted here to seek comments from others, then I guess there is no action-item on the project.