#2168·go2rtc

Socket leaks in go2rtc - creality k2plus issue?

Author: DRuggeriCreated Mar 21, 2026Updated Sep 17, 2026
Labelsbug

Big fan of the project - thank you for the work you've done over the years! I seem to remember this issue has been discussed before, but I just can't find it anywhere. Maybe it was somewhere in the frigate issue tracker, which is the "upstream" for my main go2rtc setup? Feel free to close/redirect if I missed it.

I wanted to report a situation where, over time go2rtc leaks sockets, eventually causing system instability. The most descriptive chart is below. This is from Prometheus node_exporter watching the machine: Image I have confirmed with lsof and ss that all of these connections are owned by the go2rtc process.

go2rtc version: 1.9.14 Platform: Debian Linux x86_64 Hardware: Intel iGPU (i915), VAAPI at /dev/dri/renderD128

I am happy to troubleshoot/debug however it would be helpful. To start, I have a hunch that this is related to the k2plus camera:

  • The problem started when I enabled the K2 plus stream about two weeks ago
  • The printer is powered off when not in use... maybe something eats up sockets in a reconnect loop?
  • This is a pretty new integration using webrtc and I recall seeing bugs about Pion WebRTC leaking UDP sockets during failed connection setups

Other FYI:

  • I use the Frigate docker container, but have the latest go2rtc mounted into the container over the version shipped with Frigate since it lags from time to time.
  • To be sure this isn't client→go2rtc caused, I disabled webrtc serving in go2rtc. This was the restart two days ago, confirming that's not the issue.
  • I just disabled the k2plus stream to be absolutely sure that was indeed the change that trigger alone is the cause