ckcr4lyf / kiryuu

A highly performant HTTP bittorrent tracker (WIP)
Do What The F*ck You Want To Public License
13 stars 3 forks source link

High latency, TCP errors #41

Closed ckcr4lyf closed 1 year ago

ckcr4lyf commented 1 year ago

Getting high latency for ~2 hours, with a lot of TCP errors.

image

image

Announce Latency: from ~0.2ms to ~30ms

ckcr4lyf commented 1 year ago

Could be due to some kinda "unintentional DDoS" at TCP level? E.g. heavy scraping of the tracker?

Current TCP params:

$ cat /proc/sys/net/core/somaxconn
4096
$ cat /proc/sys/net/ipv4/tcp_max_syn_backlog
128

Will update both to 16384 and see what happens.

Also seems the prlimit was low for it:

$ prlimit --pid $(pgrep kiryuu) -n
RESOURCE   DESCRIPTION                             SOFT      HARD UNITS
NOFILE     max number of open files                1024    524288 files

Updated via prlimit --pid $(pgrep kiryuu) --nofile=16384:524288

ckcr4lyf commented 1 year ago

Reference: https://www.alibabacloud.com/blog/tcp-syn-queue-and-accept-queue-overflow-explained_599203

ckcr4lyf commented 1 year ago

Seems fine now, closing

image