Uploaded image for project: 'MaxScale'
  1. MaxScale
  2. MXS-1263

broken TCP connections are not always cleaned properly

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.5, 2.1.2
    • Fix Version/s: 2.1.3
    • Component/s: CLI
    • Labels:
      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.

        Attachments

          Activity

            People

            • Assignee:
              markus makela markus makela
              Reporter:
              anikitin Andrii Nikitin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: