I have a Django app running on a python instance with Nginx as the webserver.
I'm getting a 60 second timeout for one of my operations. According to the docs, you want to increase the load balancer's idle timeout above the default 60 seconds (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html)
It also says:
we recommend that you enable the HTTP keep-alive option for your EC2 instances. You can enable HTTP keep-alive in the web server settings for your EC2 instances
Well I'm not sure how to do this or where that setting is. Can anyone point me to where the keep-alive
option is?
In the navigation pane, choose Session Manager. Choose the Preferences tab, and then choose Edit. Specify the amount of time to allow a user to be inactive before a session ends in the minutes field under Idle session timeout. Choose Save.
Elastic Load Balancing (ELB) now offers support for configurable idle timeouts. This setting allows you to specify the length of time that a connection should remain open while in an idle state. Until now, ELB provided a default idle timeout of 60 seconds for all load balancers.
I'm running into the same issue now and have come to the conclusion that it's just a poorly worded bit of docco and as Mark B suggests in his comment, it's referring to setting the Keep-Alive header from your nginx/apache webserver config rather than on the ec2 instance itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With