kerryjiang / SuperSocket

SuperSocket is a light weight, cross platform and extensible socket server application framework.
Apache License 2.0
3.94k stars 1.14k forks source link

The sending attempt timed out #97

Open Liuhuifeng opened 7 years ago

Liuhuifeng commented 7 years ago

The sending attempt timed out at SuperSocket.SocketBase.AppSession2.InternalSend(ArraySegment1 segment) at SuperSocket.SocketBase.AppSession2.Send(Byte[] data, Int32 offset, Int32 length) at SuperSocket.SocketBase.AppSession2.Send(String message) at YLB.Mutil.IMService.WinSession.Send(Object msg) in D:\Project\YaleBao\YLB.Mutil.IMService\App\WinSession.cs:line 98

每隔一两天,一段时间内会出现很多 timed out 异常,大概800个连接数

`<superSocket maxWorkingThreads="30" minWorkingThreads="10" maxCompletionPortThreads="30" minCompletionPortThreads="10">

`
a549297336 commented 7 years ago

我也遇到了这个问题。。不知道是哪里的错

chengwengao commented 7 years ago

这个应该网络不稳定或者服务端socket连接所占用的句柄数被用完等原因造成的,但是supersocket有断线重连机制,你再持续观察一段时间,看这些丢失的连接是否会重新连接。

shenzhigang commented 6 years ago

SuperSocket.Websocket 运行一天之后,服务端往客户端发送的时候,出现 “System.TimeoutException: The sending attempt timed out”

rayxelloss commented 5 years ago

我也遇到同样的问题,有人解决了吗?

chengwengao commented 5 years ago

我也遇到同样的问题,有人解决了吗? 试一下这么修改,再持续观察一下: 服务器端设置: 可以修改一下起始端口: netsh int ipv4 set dynamicport tcp start=2000 num=63000 netsh int ipv4 set dynamicport udp start=2000 num=63000 netsh int ipv6 set dynamicport tcp start=2000 num=63000 netsh int ipv6 set dynamicport udp start=2000 num=63000

然后修改一下注册表缩短time-wait的时间。 regedit打开注册表,添加 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters “MaxUserPort”=dword:0000fffe(65534) “TcpTimeWaitDelay”=dword:0000005 (缩短为5秒)

river-and-boat commented 5 years ago

SuperSocket.Websocket 运行一天之后,服务端往客户端发送的时候,出现 “System.TimeoutException: The sending attempt timed out”,同样的问题,有人知道解决办法吗

overing commented 5 years ago

https://github.com/kerryjiang/SuperWebSocket/issues/48