Producer randomly freezing throwing error to console

Hi, When sending a video stream to the mediasoup-server then consuming by a different client periodically the video stream will freeze for a few frames then continue.
This occurs at any resolution and framerate, seems to occur more on higher resolutions+framerate
Everything is on the same local network.

Image of error on producer console:

ICE state is failing most likely for client and you may need to restart it automatically or offer an option manually.

I would say why you see this error is that your keep-alive mechanism stays active longer than this re-attempt/failure.

So all in all try restarting ICE if you’re keeping user state alive.

The connected is still active and sending packets, randomly a few packets will fail to send causing the stream to freeze and drop some frames.

That’s not normal. In Production I only see this issue when bitrate can’t be met and I must lessen the load temporarily. You can try TCP strictly and a keyframe of 2-4 seconds see if that helps any. (This is assuming you’re not peaking in CPU usage at all).