Unable to resolve "client intended to send too large body" using extensions

0

Hi folks,

I have a dockerized Django app running on Elastic Beanstalk environment that allows users to upload images. I'm seeing a bunch of "client intended to send too large body" errors on image upload. I looked around on the internet and learned that this issue is caused by Nginx and the solution is to increase the client_max_body_size. Since Nginx is managed by Beanstalk, I am trying to update the limit via .ebextensions. I'm using Amazon Linux AMI and hence I did the following:
- Created a directory structure as follow: .platform/nginx/conf.d/elasticbeanstalk
- Created a file 01_body_size.conf with the content below:
client_max_body_size 10M;
I bundled up the .platform directory with my Dockerrn.aws.json, I can see the file being copied to /etc/nginx/conf.d/elasticbeanstalk/ on the EC2 instance managed by Beanstalk. Given the following entry in /etc/nginx/nginx.conf
- include conf.d/elasticbeanstalk/*.conf;
everything should work but it isn't and I'm still seeing the error in /var/log/nginx/error.log complaining that it got a request that was too large from the loadbalancer. I think I'm missing some small details and would love some help to figure this out.

asked 4 years ago701 views
1 Answer
0

This is resolved.

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions