Simply changing (increasing) the uwsgi's listen backlog using the -l or --listen option while starting the server, to a value greater then 128 won't allow uwsgi to run. As there's also a system level limit on Unix socket and TCP connection listen queue - the default is 128, you can verify it (for Unix socket):
cat /proc/sys/net/core/somaxconn
uwsgi had been patched, such that if the value passed to --listen parameter while starting uwsgi is greater then the system level limit (Linux kernel limit) it'll cause uwsgi to fail hard. If you want set uwsgi's listen queue limit greater than the system level limit (i.e. 128) - you must first increase the kernel's limit. Can be done executing the following commands:
$ echo 4096 > /proc/sys/net/core/somaxconn
$ cat /proc/sys/net/core/somaxconn
4096
Or
$ sysctl -w net.core.somaxconn=4096
Or, Add net.core.somaxconn=4096 to /etc/sysctl.conf for it to become permanent (survive a reboot).
0 Comments
Please log in to leave a comment.