I have a multi-peer setup for WebRTC that seems to work pretty well (Android Clients, Linux Server). The client and server are both based on the example code in the webrtc source repo. What I'm noticing however is, once I go past a certain number of peers connected (~6 or 7), after some time of staying connected (~5 mins), some of the peers start failing to communicate with the STUN/TURN server (I'm using coturn). The errors I see are basically STUN ping timeouts (after 15s), and failure to send UDP bytes (error 11). The ICE Connection State then changes to failed and the peers disconnect.
I've tried literally everything (increasing all possible timeouts, double checking TURN server configuration, etc.). The only thing I can think of is that, it seems the Android Clients that disconnect tend to be the ones that are an the older side (in terms of hardware). My guess is that perhaps the UDP message queue on the client fills up, and hence the messages fail to send. But I can't see why this would only be the case after ~5 mins of staying connected.
Does anyone have any ideas? Here are some of the exact error messages:
port.cc: (line 1492): Conn[96ab9c00:audio:Net[ccmni1:100.0.0.x/8:Cellular:id=2]:JomL6/YW:1:0:local:udp:192.168.1.x:59697->yWvRWcrV:1:2122260223:local:udp:192.168.0.x:37670|C--I|-|0|0|9114193830701055486|-]: Timed out after 15023 ms without a response, rtt=6000
port.cc: (line 1752): Conn[96b27400:audio:Net[wlan0:192.168.1.x/24:Wifi:id=6]:sk5UmY5t:1:0:stun:udp:100.8.212.x:40784->vuK2flVH:1:1686052607:stun:udp:104.173.214.x:42426|CRWS|S|1|0|7241540809772645886|93]: Timing-out STUN ping 4a716d2b6a59385578594634 after 60000 ms
stun_port.cc: (line 284): Port[b8a75100:audio:1:0:local:Net[wlan0:192.168.1.x/24:Wifi:id=6]]: UDP send of 103 bytes failed with error 11
For reference, I am using WebRTC built from branch m73. Any leads would be appreciated, thanks.