小编mum*_*eka的帖子

TCP 连接过多导致断开连接

我有一个使用 TCP 连接运行的游戏服务器。服务器随机断开用户连接。我认为它与服务器的 TCP 设置有关。

在本地开发环境中编写的代码可以处理 8000+ 并发用户而不会出现任何断开或错误(在 localhost 上)。

但是在实际部署的 Centos 5 64bit Server 中,服务器创建这些断开连接与并发 tcp 连接数量无关。

服务器似乎无法处理吞吐量。

netstat -s -t
IcmpMsg:
    InType0: 31
    InType3: 87717
    InType4: 699
    InType5: 2
    InType8: 1023781
    InType11: 7211
    OutType0: 1023781
    OutType3: 603
Tcp:
    8612766 active connections openings
    14255236 passive connection openings
    12174 failed connection attempts
    319225 connection resets received
    723 connections established
    6351090913 segments received
    6180297746 segments send out
    45791634 segments retransmited
    0 bad segments received.
    1664280 resets sent
TcpExt:
    46244 invalid SYN …
Run Code Online (Sandbox Code Playgroud)

networking tcp linux-networking centos5

6
推荐指数
1
解决办法
3万
查看次数

标签 统计

centos5 ×1

linux-networking ×1

networking ×1

tcp ×1