uwsgi:您的服务器套接字listen backlog被限制为100个连接 [英] uwsgi: your server socket listen backlog is limited to 100 connections
问题描述
lockquote
你的服务器套接字listen backlog被限制为100个连接。
如何克服100个连接限制?
我的跑步脚本如下:
pre $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ -s /tmp/app.sock --module myapp:app --processes 2 -H / srv / sites / mysite chmod-socket 666 --enable-threads
$ p请注意,100个连接的监听积压并不意味着你的服务器只能处理100个同时(或总共)的数据,连接 - 这取决于配置的进程或线程的数量。监听积压是一个套接字设置,告诉内核如何限制监听套接字的监听队列中未完成(尚未被占用)连接的数量。如果未决连接的数量超过了指定的大小,则新的连接将被自动拒绝。定期为其连接提供服务的服务器不应占用大量backlog。
根据手册,您可以使用来更改listen backlog l
选项:
-l | --listen< num>
将套接字侦听队列设置为< n> (默认为100,最大值是系统
的依赖)
I run a flask app on uwsgi. I use supervisor to manage uwsgi process. I find the log saying that
your server socket listen backlog is limited to 100 connections.
How to overcome 100 connections limitation? My running script is as below:
[program:myapp]
command=uwsgi --master -s /tmp/app.sock --module myapp:app --processes 2 -H /srv/sites/mysite chmod-socket 666 --enable-threads
Note that a "listen backlog" of 100 connections doesn't mean that your server can only handle 100 simultaneous (or total) connections - this is instead dependent on the number of configured processes or threads. The listen backlog is a socket setting telling the kernel how to limit the number of outstanding (as yet unaccapted) connections in the listen queue of a listening socket. If the number of pending connections exceeds the specified size, new ones are automatically rejected. A functioning server regularly servicing its connections should not require a large backlog size.
According to the manual, you can change the listen backlog with the -l
option:
-l|--listen <num>
set socket listen queue to <n> (default 100, maximum is system
dependent)
这篇关于uwsgi:您的服务器套接字listen backlog被限制为100个连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!