Max file upload issue with Rancher Nginx Load Balancer

I’m using Rancher 2.0.2 setup with a Load Balancer to perform SSL termination/reverse proxying. Functionally it seems to work until I try to upload a large file (~13MB) to a Flask webserver being hosted in a container behind the ingress controller.

The error I get after ~20 seconds of trying to upload the file is:
413 Request Entity Too Large

From looking through the docs and forums, this error looks to be caused by the default nginx setting for client_max_body_size being set to 1M. On a normal nginx setup, I could just go update /etc/nginx/nginx.conf and add/update this parameter. How can I do this for the Rancher 2.0 load balancer ingress controller?

For reference, I have this same workload image running the Flask webserver behind a Rancher 2.0.0-alpha9 deployment (it might use ha proxy for load balancing and ssl termination instead?) and do not see this issue.


1 Like

Check this:

Thanks, are there any examples/instructions on how to apply a config map through Rancher?

I created this ConfigMap file:

kind: ConfigMap
apiVersion: v1
name: default/nginx-configuration
data: “200m” “200m”

And went to the Workloads > Load Balancing > Import YAML. It would not accept the Config map until I removed the '/'s. So I ended up importing the following which was accepted:

kind: ConfigMap
apiVersion: v1
name: nginx-configuration
client-max-body-size: “200m”
proxy-body-size: “200m”

However, this did not seem to have any effect when I tried to re-upload the large file. Any guidance?