mediasoup server closes unexpectedly

Sometimes mediasoup server closes unexpectedly

protoo-server:ERROR:WebSocketTransport connection "error" event [conn:WSS:[xx.xx.xx.xx]:55646, error:Error: read ECONNRESET
   at TLSWrap.onStreamRead (internal/stream_base_commons.js:183:27) {
 errno: 'ECONNRESET',
 code: 'ECONNRESET',
 syscall: 'read'
}]

If you want to make a question make a question. Just pasting random LEGIT logs won’t produce a response or explanation here.

Sorry for the lack of details in the question.

I have been testing mediasoup for one of my projects. For conducting meetings. Usually meetings last for an hour. There will be 3 or 4 peers connecting from different networks. Sometimes the meeting goes smoothly. But most often, mediasoup is getting disconnected and freezes. I checked the mediasoup server log files and is seeing the below error message all the time this issue happens.

2020-02-11T12:43:14.551Z protoo-server:ERROR:WebSocketTransport connection "error" event [conn:WSS:[xx.xx.xx.xx]:xxxx, error:Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:183:27) {
  errno: 'ECONNRESET',
  code: 'ECONNRESET',
  syscall: 'read'
}]

I have been searching through, to find a cause for this issue. But so far not able to find why this is happening. I have opened up 10,000 ports for this as per its requirement in the server/config.js file.

        workerSettings: {
            rtcMinPort: 40000,
            rtcMaxPort: 49999
        }

Could this be related to any server configurations that mediasoup requires? Any help is greatly appreciated. Thanks in advance.

Actually you are not really testing mediasoup but the mediasoup-demo project, which is just a demo. It uses WebSocket for signaling with client, but WebSocket is NOT part of mediasoup. The error you see just means that a remote client disconnected its WS for whatever reason. Just that.

How is that related to WebSocket disconnection? Please, don’t try random things. Read the mediasoup documentation instead and look at the mediasoup-demo code.

Could this be related to any server configurations that mediasoup requires?

No, there is no magic configuration setting to make the demo work or not.

Thank you very much for pointing out the mistake.