Error 413. request entity too large

When editing and configuring my app in retool. After I run the intial GET queries to showcase the content that users can edit, as soon as I make an edit I get an 'unknown error' and the message: Failed to load resource: the server responded with a status of 413 (request Entity Too Large)".

I saw this post: Request size limit , however for someone using self-hosted retool, are there more defined steps on how to fix this error?

I have access to the nginx config and see the client_max_body_size is 10M. Is this value that I would have to increase?

Secondly, I am getting the error stated above everytime I try to make an edit. I inc. it to 40, thoughts before I merge changes to master branch code?

server {
client_max_body_size 40M;
... }

Also do I need to adjust this variable as well? -> nginx.ingress.kubernetes.io/proxy-body-size

Hey @Ian_Stack,

Environment variable are up to your team to manage ultimately. However, we've seen success with other clients running into this issue increasing their client_max_body_size :+1:.

I increased the size to 40 M and same results. I get the same 413 error. When I inpsect the page of the error I see this content:
Content-Length: 1049646

I assume this is bytes, so this is still under 40 M.

Do you have another solution to solve this? Follow these steps? Kubernetes nginx ingress controller cannot upload size more than 1mb - Stack Overflow?

40MB is our recommendation for client_max_body_size :+1:

I tried that and I still have the same error, even after implementing 40 M to the client max body size. I can try 40 MB but isn't that the same thing as 40 M?

' Important: M and MB are equivalent expressions for "megabyte" .'

Yes, M and MB are equivalent expressions. In this case M is the correct unit. I'm reading up a bit more on the issue. The solution is dependent upon your specific infrastructure stack. Would you mind expanding on what that is for your team? Could you share a description of what, if any, proxy, load balancer etc, you have configured in front of your Retool instance?

Follow up question from before: I am using kuberntes to deploy our retool instance. I added the client_max_body size to 40M via the nginx-config.yaml. Should I do it in the ingress.yaml as well?

As for your question:
traffic goes in to AVI (traffic manager/load balancer) -> k8s ingress controller (nginx reverse proxy) -> retool pod (nginx reverse proxy)

There's likely is a size limitation being put on a proxy or some other step in your deployment process. I recommend looking into the docs of your infrastructure stack to see what could be causing that. You might have some luck posting your question in our discord channel and seeing if anyone there has a similar infrastructure!

Was able to look at pipeline to see limitation. I needed to update the client_max_body size in the ingress.yaml file as well. Thank you for you help!

1 Like

I'm so happy to hear you found the limiting variable! Thank you for sending an update. :raised_hands:

1 Like