Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
2.0.5, 2.1.2
-
None
Description
Following example demonstrates that TCP connections may stuck for long time (I waited for 30+ min); connect_timeout was set to 60 just in case for the 'Read-Write Service'.
This means that socket or open file limit exhaust may happen with unstable network or unstable client programs, etc.
$ bin/maxscale --basedir=$(pwd)
|
$ sudo bin/maxadmin 'list clients' | wc -l
|
7
|
$ for i in {1..100} ; do telnet 127.0.0.1 4006 & done
|
...
|
$ sudo bin/maxadmin 'list clients' | wc -l
|
107
|
$ date
|
Wed May 10 22:12:44 CEST 2017
|
$ sudo bin/maxadmin 'list clients' | wc -l
|
107
|
$ date
|
Wed May 10 22:45:30 CEST 2017
|
$ sudo bin/maxadmin 'list clients' | wc -l
|
107
|
$ netstat | grep 4006 | grep ESTAB | wc -l
|
200
|
$ netstat | grep 4006 | grep CLOSE_WAIT | wc -l
|
100
|
I tried to configure tcp keepalive just in case - but it doesn't seem to have any effect here.
I also tried the same 'attack' directly towards MariaDB Server :
for i in {1..100}; do telnet 127.0.0.1 3307 & done
|
And 'show processlist' doesn't show any of those connection hanging around.