teragrep / cfe_35

Record Router
GNU Affero General Public License v3.0
0 stars 2 forks source link

Connection count in statistics keeps on getting higher when connections fail (or connections get leaked) #8

Open StrongestNumber9 opened 3 days ago

StrongestNumber9 commented 3 days ago

Describe the bug

02.07.2024 15:03:44.124 [INFO] [com.teragrep.cfe_35.router.Router] [metrics-logger-reporter-1-thread-1] type=COUNTER, name=connections, count=5700
02.07.2024 15:04:16.154 [INFO] [com.teragrep.cfe_35.router.Router] [metrics-logger-reporter-1-thread-1] type=COUNTER, name=connections, count=6300

Expected behavior

They go back down on disconnection

How to reproduce

Just keep on spamming new connections that fail, tcpflood will send all the messages on first opened connection before the rest have finished connecting -> trying to close them before they were really even open while true; do tcpflood -t 127.0.0.1 -T relp-plain -p 4600 -m 123 -M "<14>1 2020-05-15T13:24:03.603Z performance-test-host performance-test-tag - - - hello" -c 10 -Y; done

Software version

https://github.com/kortemik/cfe_35/tree/to-9

Additional context

Maybe related #5

StrongestNumber9 commented 2 days ago

The stats might be right as this might also be due to leaked connections that never gets closed, but issue remains

StrongestNumber9 commented 1 day ago

Starting the server with -DconnectionTimeout=1 -DreadTimeout=1 -DwriteTimeout=1 and spamming will leak connections even with #5