Upstream timed out 110: Connection timed out on elastic beanstalk

0

I have a node.js server hosted on Amazon Linux 2/5.4.9 elasticbeanstalk. This API server is running fine for the past year. But lately I found that the server was in severe condition and had to be restarted first so that things got better. In the logs file I get lots of error codes like the following: 2022/12/27 16:42:07 [error] 23659#23659: *7403 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.31.24.78, server: , request: "GET /url-my-api HTTP/1.1", upstream: "http://127.0.0.1:8080/url-my-api", host: "api.mydomain.com", referrer: "https://mydomain.com/"

I've never done any updates. Is there a solution that I should do?

Additional information:

  1. Instance types : t2.small
  2. Scaling cooldown : 180s
  3. Servers live 24 hours
2 Answers
0

Are you using cloudwatch for any metric monitoring of your elastic beanstalk environment or servers? Have you also tried to integrate x-ray to determine further latency problems?

Cloud_G
answered a year ago
  • I haven't used it and don't know how to use it

0

Hello,

Are you using nginx and configured proxy_pass with upstream server. If so you have some issue on resolving DNS. After a time, the upstream is not reachable and you have to restart to have access again. Is that the issue you have ?

https://distinctplace.com/2017/04/22/nginx-upstream-timed-out/

Ismahel
answered a year 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