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

connection_keepalive=0 causes a memory leak

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.5.20, 6.3.1
    • Fix Version/s: 2.5.21, 6.4.0
    • Component/s: Protocol
    • Labels:
      None
    • Environment:
      Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-107-generic x86_64)
      Server version: 10.6.7-MariaDB-1:10.6.7+maria~focal-log

      Description

      Under heavy load, MaxScale consumes RAM indefinitely. Tested from 2.5.19 to 6.3.0.
      The maxscale process constantly increases the memory used until sysbench is stopped

      sysbench /usr/share/sysbench/oltp_read_write.lua --mysql-host=1.1.1.1 --mysql-port=33306 --mysql-user=testuser --mysql-password='testpass' --mysql-db=sbtest --db-driver=mysql --tables=3 --table-size=10000000 --report-interval=10 --threads=400 --time=8000 --db-ps-mode=disable run

      On another server with a lot of RAM, I saw 150GB of memory used by the maxscale process in 8 hours of sysbench

      [maxscale]
      threads=4
      skip_name_resolve=true
      auth_connect_timeout=20s
      query_retries=2
      query_classifier_cache_size=0 *(with and without this options)*
      writeq_high_water=0 *(with and without this options)*
      writeq_low_water=0 *(with and without this options)*
       
      [server1]
      type=server
      address=1.1.1.1
      port=3306
      extra_port=8385
      proxy_protocol=true
      persistpoolmax=500 *(with and without this options)*
      #persistmaxtime=5m *(with and without this options)*
      protocol=MariaDBBackend
       
      [server2]
      type=server
      address=1.1.1.2
      port=3306
      extra_port=8385
      proxy_protocol=true
      persistpoolmax=500 *(with and without this options)*
      #persistmaxtime=5m *(with and without this options)*
      protocol=MariaDBBackend
       
      [server3]
      type=server
      address=1.1.1.3
      port=3306
      extra_port=8385
      proxy_protocol=true
      persistpoolmax=500 *(with and without this options)*
      #persistmaxtime=5m *(with and without this options)*
      protocol=MariaDBBackend
       
      [Replication-Monitor]
      type=monitor
      module=mariadbmon
      servers=server1, server2, server3
      user=maxscale
      password=passwd
      failcount=5
      monitor_interval=2s
      backend_connect_timeout=3s
      backend_connect_attempts=2
      backend_write_timeout=60s
      backend_read_timeout=60s
      auto_failover=true
      auto_rejoin=true
      enforce_read_only_slaves=on
      enforce_simple_topology=true
      cooperative_monitoring_locks=majority_of_running
       
      [Write-Service]
      type=service
      router=readconnroute
      router_options=master
      connection_keepalive=0s
      servers=server1, server2, server3
      user=maxscale
      password=passwd
       
      [Read-Service]
      type=service
      router=readconnroute
      router_options=slave
      connection_keepalive=0s
      servers=server1, server2, server3
      user=maxscale
      password=passwd
       
      [Write-Listener]
      type=listener
      service=Write-Service
      protocol=MariaDBClient
      port=33306
       
      [Read-Listener]
      type=listener
      service=Read-Service
      protocol=MariaDBClient
      port=33307
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              nantti Niclas Antti
              Reporter:
              dzoleg Oleg
              Votes:
              3 Vote for this issue
              Watchers:
              5 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.