60 Second Timeout on Elastic Beanstalk

0

I have a single-instance (NO load balancer) Docker container (NO proxy server) that times out at exactly sixty seconds no matter what I do.

Yes, I'm aware of the many seemingly "duplicate" questions. I've been trying to solve this problem for 40+ hours. I've seen them all.

Every single answer to these questions informs the user that they must change the settings of NGINX or the load balancer.

However, I have NEITHER NGINX or a load balancer for the environment, yet it still times out. I am mostly convinced that this is an AWS bug.

I have an endpoint titled time_test for the mini server I created. When I make a POST request to the endpoint, I get a timeout at exactly 60 seconds (the request throws an exception on my end).

Here's the Python code to make the request.

import requests
url = f"http://...us-east-1.elasticbeanstalk.com/"
time_to_sleep = 65
url += f"time_test?time_to_sleep={time_to_sleep}"
response = requests.post(url=url, timeout=10000)

This throws an HTTPSException error, indicating that the server terminated the response, always at exactly 60 seconds.

However, the logs show a successful response.

My logs (specifically, "eb-docker/containers/eb-current-app/eb-blahblah-stdouterr.log) shows

[01/Jun/2022 22:05:49] "POST /time_test?time_to_sleep=65 HTTP/1.1" 200 -

Note the 200 successful status code.

I'm going to continue to find an answer to this problem, which seemingly has none, and will report back if so. Any help with how to change the environment to accept >60 second requests would be greatly appreciated. Please don't reply, "You should have shorter request times." Not helpful or applicable.

(Platform = Docker running on 64bit Amazon Linux 2/3.4.10)

jw1
asked 2 years ago247 views
1 Answer
0

Hello,

Because there are no ELB or proxy this would be an OS or docker/application level issue. Please confirm if this issue occurs on the instance with a POST request over localhost. Additionally, confirm if this issue also occurs when testing the same container on a local machine vs plain EC2.

I recommend checking the app level settings, OS level settings such as iptables and docker daemon settings. For example, if using a PHP docker container, the env variables below can be configured;

PHP_MAX_INPUT_TIME

PHP_DEFAULT_SOCKET_TIMEOUT

I found similar issues here and here that pertain to this issue that are worth taking a look.

If further assistance is needed, and because we would require non-public information, please open a support case by going to the Support Center Console

AWS
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions