Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The sending attempt timed out #97

Open
Liuhuifeng opened this issue Apr 6, 2017 · 7 comments
Open

The sending attempt timed out #97

Liuhuifeng opened this issue Apr 6, 2017 · 7 comments

Comments

@Liuhuifeng
Copy link

Liuhuifeng commented Apr 6, 2017

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个连接数

`

  <server name="" serverType=""
          ip="Any"
          port="5222"
          listenBacklog="100"
          mode="Tcp"
          textEncoding="UTF-8"
          sendingQueueSize="100"
          receiveBufferSize="512"
          sendBufferSize="512"
          disableSessionSnapshot="true"
          clearIdleSession="true"
          clearIdleSessionInterval="60"
          sendTimeOut="5000"
          idleSessionTimeOut="120"
          maxConnectionNumber="4000">
  </server>`
@a549297336
Copy link

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

@chengwengao
Copy link

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

@shenzhigang
Copy link

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

@rayxelloss
Copy link

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

@chengwengao
Copy link

我也遇到同样的问题,有人解决了吗?
试一下这么修改,再持续观察一下:
服务器端设置:
可以修改一下起始端口:
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
Copy link

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

@overing
Copy link

overing commented Apr 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants