Browse Source

[Python] uWSGI: fix max connections (net.core.somaxconn) (#8142)

Oleg S 2 years ago
parent
commit
c02fa001c9
2 changed files with 2 additions and 2 deletions
  1. 1 1
      frameworks/Python/uwsgi/nginx.conf
  2. 1 1
      frameworks/Python/uwsgi/uwsgi.ini

+ 1 - 1
frameworks/Python/uwsgi/nginx.conf

@@ -6,7 +6,7 @@ error_log stderr error;
 events {
 events {
     # This needed to be increased because the nginx error log said so.
     # This needed to be increased because the nginx error log said so.
     # http://nginx.org/en/docs/ngx_core_module.html#worker_connections
     # http://nginx.org/en/docs/ngx_core_module.html#worker_connections
-    worker_connections  65535;
+    worker_connections  4095;
     multi_accept on;
     multi_accept on;
 }
 }
 
 

+ 1 - 1
frameworks/Python/uwsgi/uwsgi.ini

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