nginx显示,连接数已经超过最大的限制。
站点运行几个小时之后,开始出现错误,可能是因为已有的连接没有释放,导致连接越来越多,也有可能反向代理配置的问题。搞不灵清啊,
难道真的是因为并发量太大了?
nginx反向代理服务器配置如下:
server { listen 80; server_name www.domain1.com; location /{ proxy_pass http://localhost:4999; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection keep-alive; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } } server { listen 80; server_name www.domain2.com; location /{ proxy_pass http://localhost:4999; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection keep-alive; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; proxy_connect_timeout 300s; proxy_send_timeout 300s; proxy_read_timeout 300s; } }
nginx配置如下:
http { client_max_body_size 20m; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE ssl_prefer_server_ciphers on; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; gzip on; gzip_disable "msie6";
相关问题
- How can I prevent my Shiny App from disconnecting
- Can't configure nginx as a proxy for tomcat wi
- How to set Nginx URI to fix empty URI in redirect
- why does connect domain to “Shopify” ask for eithe
- Nginx with Daphne gives 502 Bad Gateway
http://localhost:4999
这个对于的nginx配置是什么?发现这个问题的原因是因为有大量的广告请求造成的,所以和nginx配置无关。