Wed Mar 13 10:23:18 2019 - *** uWSGI listen queue of socket "127.0.0.1:59861" (fd: 3) full !!! (101/100) ***
Wed Mar 13 10:23:19 2019 - *** uWSGI listen queue of socket "127.0.0.1:59861" (fd: 3) full !!! (101/100) ***
Wed Mar 13 10:23:20 2019 - *** uWSGI listen queue of socket "127.0.0.1:59861" (fd: 3) full !!! (101/100) ***
Wed Mar 13 10:23:21 2019 - *** uWSGI listen queue of socket "127.0.0.1:59861" (fd: 3) full !!! (101/100) ***
Wed Mar 13 10:23:22 2019 - *** uWSGI listen queue of socket "127.0.0.1:59861" (fd: 3) full !!! (101/100) ***
Wed Mar 13 10:23:23 2019 - *** uWSGI listen queue of socket "127.0.0.1:59861" (fd: 3) full !!! (101/100) ***
Wed Mar 13 10:23:24 2019 - *** uWSGI listen queue of socket "127.0.0.1:59861" (fd: 3) full !!! (101/100) ***
Wed Mar 13 10:23:25 2019 - *** uWSGI listen queue of socket "127.0.0.1:59861" (fd: 3) full !!! (101/100) ***
Wed Mar 13 10:23:26 2019 - *** uWSGI listen queue of socket "127.0.0.1:59861" (fd: 3) full !!! (101/100) ***
Wed Mar 13 10:23:27 2019 - *** uWSGI listen queue of socket "127.0.0.1:59861" (fd: 3) full !!! (101/100) ***
现象如上图,今天服务器报出这样的问题,根据提示信息可以理解为:uwsgi的队列满了,所以需要改下配置信息
uwsgi:
http: 0.0.0.0:8080
chdir: /export/server/
module: sorce.web.wsgi
processes: 6
listen : 100
daemonize: /tmp/uwsgi.log
pidfile: /tmp/uwsgi.pid
master: true
disable-logging : true
stats: /tmp/uwsgi.socket
enable-threads: true
buffer-size: 32768
listen 字段的意思就是队列的长度,默认是100,所以报上面的错误,改大点就可以了。
如果问题没有解决,查看系统相关设置
修改/etc/sysctl.conf文件,添加或者修改这几个参数值
#对于一个经常处理新连接的高负载 web服务环境来说,默认的 128 太小了
net.core.somaxconn = 262144
#表示SYN队列的长度,默认为1024,加大队列长度为8192,可以容纳更多等待连接的网络连接数
net.ipv4.tcp_max_syn_backlog = 8192
#网卡设备将请求放入队列的长度
net.core.netdev_max_backlog = 65536
执行sysctl -p
重新load参数设置,这样会立即生效,并且以后重新启动机器也会生效