You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the UDP SOCKS5 support was added in #3353, the logs are flooded with:
WARN [socks5] failed routing UDP packet: association packet queue full
This happens constantly when using Gluetun's SOCKS5 proxy with qBittorrent under normal load (hundreds of active torrents doing periodic UDP tracker announces).
Root cause
In `internal/socks5/udp_router.go`, the per-association channel buffer is hardcoded to 2:
When the UDP router receives packets faster than `forwardClientPackets` can drain the channel, packets are dropped with "association packet queue full". With many active torrents each sending periodic UDP tracker announces, this overflows constantly.
Expected behavior
UDP packets should not be silently dropped under normal BitTorrent load. The buffer size should be larger, or backpressure/congestion handling should be implemented.
Suggested fix
Increase `udpPacketChannelBuffer` to a more appropriate value (e.g. 64 or 256), or make it configurable via the existing SOCKS5 settings.
Is this urgent?
No
Description
After the UDP SOCKS5 support was added in #3353, the logs are flooded with:
This happens constantly when using Gluetun's SOCKS5 proxy with qBittorrent under normal load (hundreds of active torrents doing periodic UDP tracker announces).
Root cause
In `internal/socks5/udp_router.go`, the per-association channel buffer is hardcoded to 2:
```go
const udpPacketChannelBuffer = 2
association := udpAssociation{
...
packetCh: make(chan *bytes.Buffer, udpPacketChannelBuffer),
}
```
When the UDP router receives packets faster than `forwardClientPackets` can drain the channel, packets are dropped with "association packet queue full". With many active torrents each sending periodic UDP tracker announces, this overflows constantly.
Expected behavior
UDP packets should not be silently dropped under normal BitTorrent load. The buffer size should be larger, or backpressure/congestion handling should be implemented.
Suggested fix
Increase `udpPacketChannelBuffer` to a more appropriate value (e.g. 64 or 256), or make it configurable via the existing SOCKS5 settings.
Environment
Logs
```
WARN [socks5] failed routing UDP packet: association packet queue full
WARN [socks5] failed routing UDP packet: association packet queue full
WARN [socks5] failed routing UDP packet: association packet queue full
```
(repeated dozens of times per minute)