AWS Beanstalk: Errors in var/log/nginx/error file

0

We have setup our application on Beanstalk. We are trying to fire 5000 concurrent POST request to Beanstalk env. At first we observed 1024 worker connections error and we updated this number in nginx conf for our use case. On further testing we saw that still all the messages are not reaching our application deployed on Beanstalk. On different runs, nginx/error file had different errors like below:

  • connect() failed (111: Connection refused) while connecting to upstream
  • recv() failed (104: Connection reset by peer) while reading response header from upstream, client
  • *4889 upstream timed out (110: Connection timed out) while reading response header from upstream

We tried out the below configurations with no luck location / { proxy_connect_timeout 3600; proxy_send_timeout 3600; proxy_read_timeout 3600; fastcgi_send_timeout 3600; fastcgi_read_timeout 3600; }

CPU and Memory usage is very much normal.

Need help to understand the missing steps/configuration if any?

質問済み 1年前550ビュー
1回答
0

you may need to adjust additional settings to further optimize your environment for handling a large number of connections. For example, you could try:

Increasing worker_processes to take advantage of multiple CPU cores. Increasing keepalive_timeout to allow for persistent connections. Setting proxy_http_version 1.1 and proxy_set_header Connection ""; to enable HTTP/1.1 support with proxying. Here's an example configuration:

worker_processes auto;
events {
    worker_connections 10240;
}
http {
    keepalive_timeout 65;
    server {
        listen 80;
        location / {
            proxy_http_version 1.1;
            proxy_set_header Connection "";
            proxy_pass http://your_upstream;
            proxy_connect_timeout 3600;
            proxy_send_timeout 3600;
            proxy_read_timeout 3600;
        }
    }
}
profile picture
エキスパート
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン