擅长:python、mysql、java
<p>医生这么说</p>
<blockquote>
<p><code>socket.listen(backlog)</code> Listen for
connections made to the socket. The
backlog argument specifies the maximum
number of queued connections and
should be at least 1; the maximum
value is system-dependent (usually 5).</p>
</blockquote>
<p>显然,系统值在您的系统上大于5。我不明白为什么设置一个更大的数字会是一个问题。可能为每个排队的连接保留了一些内存。</p>
<p>我的linux手册页上有这样的内容</p>
<blockquote>
<p>If the backlog argument is greater than the value in
/proc/sys/net/core/somaxconn, then it
is silently truncated to that value;
the default value in this
file is 128. In kernels before 2.4.25, this limit was a hard coded value, SOMAXCONN, with the value 128.</p>
</blockquote>