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?

질문됨 일 년 전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
전문가
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠