Hi,
We wanted to test our multiple http client connections with nginx as webserver (no proxy).
We see http connections starts closing after 15min.Works fine till 15min.
We enabled keep alive configuration (below) but no luck.
Behaviour is same for nginx 1.18 and 1.22 versions.
Below is the sample configuration
nginx.conf
#user nobody;
worker_processes auto;
error_log logs/error.log info;
worker_rlimit_nofile 800000;
pid logs/nginx.pid;
events {
worker_connections 8192;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
keepalive_timeout 1h;
keepalive_time 1h; (Only for nginx 1.22 version)
keepalive_requests 1000000000;
client_body_timeout 60s;
client_header_timeout 60s;
send_timeout 12000s;
server {
listen 80 backlog=600000 reuseport;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
location /nginx_status {
# Turn on stats
stub_status on;
access_log off;
allow all;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
}
}
Please note that we wanted to use as webserver not reverse proxy.
Thanks in advance.
Regards
Jayakar