Answer the question
In order to leave comments, you need to log in
Why did Nginx stop sending requests to the upstream server after a huge load?
Hello,
The project uses Nginx as a load balancer. Here is a simplified configuration:
upstream ima {
server serverA:3000;
server serverA:3000 backup;
server serverA:3000 backup;
server serverA:3000 backup;
}
server {
server_name localhost;
gzip on;
sendfile on;
gzip_http_version 1.0;
gzip_proxied any;
gzip_min_length 500;
gzip_disable "MSIE [1-6]\.";
gzip_types text/plain text/xml text/css
text/comma-separated-values
text/javascript
application/x-javascript
application/json
application/atom+xml;
proxy_connect_timeout 10;
proxy_send_timeout 12;
proxy_read_timeout 14;
send_timeout 600;
client_body_timeout 600;
client_header_timeout 600;
keepalive_timeout 600;
client_max_body_size 50M;
client_body_buffer_size 20M;
access_log /home/nginx-access.log;
error_log /home/nginx-error.log warn;
location /checksum {
log_format upstream_logging '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" "$gzip_ratio"'
'"$upstream_connect_time" "$upstream_header_time" "$upstream_response_time" "$request_time"';
access_log /home/upstreams.log upstream_logging;
proxy_pass http://ima;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_next_upstream error timeout;
proxy_intercept_errors off;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question