0

I am trying to increase the value of Timeout in AWS Elasticbeanstalk with Load Balancer, behind nginx. What I did so far is to create a

.ebextensions

folder, and inside a file with these 2 configurations:

 files:
   "/etc/nginx/conf.d/nginx.custom.conf":
       mode: "644"
       owner: "root"
       group: "root"
       content: |
         client_header_timeout   1300;
         client_body_timeout     1300;
         send_timeout            1300;
         proxy_connect_timeout   1300;
         proxy_read_timeout      1300;
         proxy_send_timeout      1300;

 container_commands:
   01_restart_nginx:
     command: "sudo service nginx reload"

And then I tried with this:

 option_settings:
   - namespace: aws:elbv2:loadbalancer
     option_name: IdleTimeout
     value: 2000

None of them seem to be working, and haven't found anything else out there in google. Anyone knows how to do this, without having to enter to the server and modify the config file manually? Thanks in advance!

1

1 Answer 1

0

So, the problems were 2:

  • First, I'm using Amazon Linux 2, so instead of .ebextensions folder should create .platform folder.
  • Second, to deploy my application I have a build step in which typescript code is compiled into vanilla javascript and moved to a /dist folder. During the build I had to copy also the folder .platform to the dist folder.

To do it, in the root folder, create a directory .platform/nginx/conf.d/my-file.conf. Inside it I just increased the values:

client_header_timeout   900;
client_body_timeout     900;
send_timeout            900;
proxy_connect_timeout   900;
proxy_read_timeout      900;
proxy_send_timeout      900;

And that's all, worked perfectly.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.