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

broken TCP connections are not always cleaned properly

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.0.5, 2.1.2
    • 2.1.3
    • cli
    • 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

            markus makela markus makela
            anikitin Andrii Nikitin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.