2

Under Elastic Beanstalk and behind an Application Load Balancer, I have a WebSockets application on Embedded Jetty.

Platform: Java 8 running on 64bit Amazon Linux/2.10.1

The issue is the connection is being dropped at the one minute mark. Even though, I have already set the Application Load Balancer's Idle Timeout to 300 seconds (which is Jetty's default timeout).

Thus, I did some research and I am thinking now that is a timeout imposed by Nginx, so I followed the answer here.

I could not deploy with an .ebextension formatted like that. Elastic Beanstalk would tell me that the file to replaced did not exist. After, I run into this article, so I came up with the following script:

files:
  "/etc/nginx/conf.d/01_increase_timeouts.conf":
    mode: "000644"
    owner: root
    group: root
    content: |
      keepalive_timeout 300;
      proxy_connect_timeout 300;
      proxy_send_timeout 300;
      proxy_read_timeout 300;
      send_timeout 300;

container_commands:
  nginx_reload:
    command: "sudo service nginx reload"

This way, I am able to deploy now. However, WebSockets connections continue to being dropped at the one minute mark.

Can anyone point out what I am doing wrong or what I could try next?

Please, any help would be greatly appreciated.

gzuniga
  • 23
  • 3

0 Answers0