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
Hi, this is not a fault with the project, but it's something I hit while using this (and almost every alternative) and which surprised me, so maybe it'd be nice to add something about it to the documentation?
tcpproxy, correctly, does its best to take advantage of Go using the splice syscall to implement io.Copy between two net.TCPConn. This, however, leads to 6 fds being created for each proxied connection: the 2 net.TCPConn and 4 pipes (one in each direction for the each of the connections). This means you hit the (default?) soft ulimit of 1024 fds per process with just ~170 connections.
The "fix" is to raise the ulimit for the process, either using the syscall package, or systemd's LimitNOFILE directive.
The text was updated successfully, but these errors were encountered:
Hi, this is not a fault with the project, but it's something I hit while using this (and almost every alternative) and which surprised me, so maybe it'd be nice to add something about it to the documentation?
tcpproxy
, correctly, does its best to take advantage of Go using thesplice
syscall to implementio.Copy
between twonet.TCPConn
. This, however, leads to 6 fds being created for each proxied connection: the 2net.TCPConn
and 4 pipes (one in each direction for the each of the connections). This means you hit the (default?) softulimit
of 1024 fds per process with just ~170 connections.The "fix" is to raise the
ulimit
for the process, either using thesyscall
package, orsystemd
'sLimitNOFILE
directive.The text was updated successfully, but these errors were encountered: