Vasu
Vasu

Reputation: 22384

elastic-beanstalk http request timeout

I have deployed a webapp using elastic-beanstalk (Tomcat8 environment). One of my REST API request takes around 2 minutes (on the server) to respond back to the client. Note that this is a bulk request which involves several 3rd party system calls, therefore, takes a maximum of 2 minutes, which is acceptable for the business (at least for the time being). However, I am always getting the below error at the client side exactly after 60 seconds:

enter image description here I have updated the Timeout & KeepAliveTimeout parameters inside httpd.conf file to 120 seconds and also changed the 'connectionTimeout' to 120000 inside server.xml of Tomcat8. Both of these did not work.

The question is from where the timeout value of 60 seconds is coming from i.e., where to change the timeout of 60 seconds in elastic-beanstalk? How the timeout value can be changed in elastic-beanstalk for longer requests?

Note that there is no load balancer configured for the appplication.

Upvotes: 1

Views: 3914

Answers (1)

Juan Carlos Alafita
Juan Carlos Alafita

Reputation: 280

Check if this can help you: https://zenofchicken.wordpress.com/2015/08/17/setting-the-http-connection-timeout-on-amazon-aws-elastic-beanstalk-tomcat-instances/

There are tons of articles how to set the idle timeout of elastic load balancer, how to set the connection timeout of tomcat, and how to do it with the apache server that acts as a proxy on each node of an elastic beanstalk cluster.

Now the missing part! When you deploy your application into the elastic beanstalk environment, it performs a graceful restart of apache. Only this graceful restart is not able to reset all the settings that you throw at it. Some settings need a hard restart, like the Timeout 3600 setting above

Another user had a similar case to yours when he selected an instance that is not powerful enough. 502 Proxy Error when accessing Elastic Beanstalk endpoint

Upvotes: 1

Related Questions