Browse Source

Update nginx.conf

Optimize nginx options.
Waldecir Loureiro dos Santos Filho 12 years ago
parent
commit
1b1206d5bc
1 changed files with 4 additions and 3 deletions
  1. 4 3
      tornado/deploy/nginx.conf

+ 4 - 3
tornado/deploy/nginx.conf

@@ -1,11 +1,12 @@
 #user nginx;
 #user nginx;
-worker_processes 1;
+worker_processes 8;
 
 
 #error_log /var/log/nginx/error.log;
 #error_log /var/log/nginx/error.log;
 #pid /var/run/nginx.pid;
 #pid /var/run/nginx.pid;
 
 
 events {
 events {
-    worker_connections 1024;
+    worker_connections 8196;
+    accept_mutex off;
     use epoll;
     use epoll;
 }
 }
 
 
@@ -27,7 +28,7 @@ http {
 
 
     # access_log /var/log/nginx/access.log;
     # access_log /var/log/nginx/access.log;
 
 
-    keepalive_timeout 65;
+    keepalive_timeout 5;
     proxy_read_timeout 200;
     proxy_read_timeout 200;
     sendfile on;
     sendfile on;
     tcp_nopush on;
     tcp_nopush on;