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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ