uwsgi:您的服务器套接字listen backlog被限制为100个连接 [英] uwsgi: your server socket listen backlog is limited to 100 connections

查看:2300
本文介绍了uwsgi:您的服务器套接字listen backlog被限制为100个连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在uwsgi上运行一个应用程序。我使用主管来管理uwsgi进程。我发现日志中说

lockquote
你的服务器套接字listen backlog被限制为100个连接。

如何克服100个连接限制?
我的跑步脚本如下:

pre $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ -s /tmp/app.sock --module myapp:app --processes 2 -H / srv / sites / mysite chmod-socket 666 --enable-threads


根据手册,您可以使用来更改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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆