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.

已提問 4 年前檢視次數 711 次
1 個回答
0

This is resolved.

已回答 4 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南