Browse Source

Modify backlog limit

INADA Naoki 11 years ago
parent
commit
5a99be4a73
2 changed files with 3 additions and 1 deletions
  1. 2 1
      config/uwsgi.ini
  2. 1 0
      toolset/setup/linux/installer.py

+ 2 - 1
config/uwsgi.ini

@@ -2,7 +2,8 @@
 master
 ; Increase listen queue used for nginx connecting to uWSGI. This matches
 ; net.ipv4.tcp_max_syn_backlog and net.core.somaxconn.
-listen = 65535
+; listen = 65535
+listen = 512
 ; for performance
 disable-logging
 ; use UNIX sockets instead of TCP loopback for performance

+ 1 - 0
toolset/setup/linux/installer.py

@@ -43,6 +43,7 @@ class Installer:
     self.__run_command("cat ../config/benchmark_profile >> ../../.bashrc")
     self.__run_command("source ../../.profile")
     self.__run_command("sudo sh -c \"echo '*               -    nofile          65535' >> /etc/security/limits.conf\"")
+    self.__run_command("sudo sysctl -w net.core.somaxconn=1024")
 
     ##############################################################
     # System Tools