Browse Source

Optimize keepalive (#4352)

Most keepalive libs use only the timeout
Joan Miquel 6 years ago
parent
commit
efa9b3c6ae
2 changed files with 4 additions and 0 deletions
  1. 2 0
      frameworks/C/nginx/nginx.conf
  2. 2 0
      frameworks/PHP/php/deploy/nginx_php.conf

+ 2 - 0
frameworks/C/nginx/nginx.conf

@@ -19,6 +19,8 @@ http {
     tcp_nopush off; #default
     tcp_nopush off; #default
     tcp_nodelay on; #default
     tcp_nodelay on; #default
     keepalive_timeout 65;
     keepalive_timeout 65;
+    keepalive_disable none; #default msie6
+    keepalive_requests 300000; #default 100
 
 
     server {
     server {
         listen       8080 bind reuseport;
         listen       8080 bind reuseport;

+ 2 - 0
frameworks/PHP/php/deploy/nginx_php.conf

@@ -18,6 +18,8 @@ http {
     tcp_nopush off;
     tcp_nopush off;
     tcp_nodelay on;
     tcp_nodelay on;
     keepalive_timeout 65s;
     keepalive_timeout 65s;
+    keepalive_disable none;
+    keepalive_requests 300000;
 
 
     php_ini_path /deploy/conf/php.ini;
     php_ini_path /deploy/conf/php.ini;