memory leak
- The client is WebSocket of JavaScript.There are 5,000-8,000 connections, and clients often close or break unexpectedly (tabs are closed).WebSocketServer runs for about 2 days, when the memory usage exceeds 1GB, there will be a memory overflow.WebSocketServer USES Secure Connection.
- When the number of connections is not at its peak, memory does not drop, but slowly increases.
- When the number of connections is large, websocketserver.stop can be time-consuming (at least more than 2 minutes).
我遇到和你一样的状况,请问大侠解决了吗?你有没有把KeepClean设为false?
我遇到和你一样的状况,请问大侠解决了吗?你有没有把KeepClean设为false?
No,"KeepClean=true”, I have abandoned using this component, I change to another component. component name “SuperSocket”,A single service supports 10,000+ connections。 https://github.com/kerryjiang/SuperSocket
我试了,但是这个SuperWebSocket对WebSocket协议的实现有问题,由于业务上我无法升级客户端请求的协议导致不能用这个SuperWebSocket服务端。
我试了,但是这个SuperWebSocket对WebSocket协议的实现有问题,由于业务上我无法升级客户端请求的协议导致不能用这个SuperWebSocket服务端。
SuperSocket contains SuperWebSocketServer and supports WebSocket Secure Connections (TLS1 --TLS1.3). To support TLS1.3, you need to upgrade SuperSocket (v1.6.6) to.NET 4.8. config file content contains <security="Default, Tls11, Tls12, Tls13"> doc: https://docs.supersocket.net/v1-6/zh-CN
我试了,但是这个SuperWebSocket对WebSocket协议的实现有问题,由于业务上我无法升级客户端请求的协议导致不能用这个SuperWebSocket服务端。
Chorme browser 79+ version, enabled WebSocket secure connection as TLS1.3, The SuperSocket (V1.6.6) framework is.NET 4.5, which only supports TLS1.2. You need to upgrade the SuperSocket framework to.NET 4.8. If you use SuperSocket (V2.0), there is no problem.
感谢帮忙,我还没用过4.8,暂时升级不了。我准备读一下WebSocketSharp的代码找找看哪里内存泄露的。
解决了,Ext.ReadBytesAsync中有一个var dest = new MemoryStream ()未释放导致的内存泄露。
解决了,Ext.ReadBytesAsync中有一个var dest = new MemoryStream ()未释放导致的内存泄露。
bro how fix it ?