Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-33990

SHOW STATUS counts ER_CON_COUNT_ERROR as Connection_errors_internal

Details

    Description

      Among status variables, there are

      | Connection_errors_internal        | 0     |
      | Connection_errors_max_connections | 0     |
      

      The first is described in documentation as

      Description: Number of refused connections due to internal server errors, for example out of memory errors, or failed thread starts

      The second one as

      Number of refused connections due to the max_connections limit being reached.

      which seems quite clear.

      However, in fact such connections are added to Connection_errors_internal instead:

      show global status like 'Connection_errors%';
       
      set @max_con.save= @@max_connections;
      set global max_connections= 10;
       
      --let $n= 12
      while ($n)
      {
        --error 0,ER_CON_COUNT_ERROR
        --connect (con$n,localhost,root)
        if ($mysql_errno) {
          --echo # ERROR $mysql_errno
        }
        --dec $n
      }
       
      --connection default
      show global status like 'Connection_errors%';
      set global max_connections= @max_con.save;
      

      10.5 7d36919f4b73a2507555ed101ccd02cb266dcc52

      connect  con$n,localhost,root;
      # ERROR 1040 
      connect(localhost,root,,test,16000,/mnt8t/bld/10.5-rel/mysql-test/var/tmp/mysqld.1.sock);
      connect  con$n,localhost,root;
      # ERROR 1040 
      connection default;
      show global status like 'Connection_errors%';
      Variable_name	Value
      Connection_errors_accept	0
      Connection_errors_internal	2
      Connection_errors_max_connections	0
      Connection_errors_peer_address	0
      Connection_errors_select	0
      Connection_errors_tcpwrap	0
      

      Reproducible starting from 10.5 and up. On 10.4, the situation is a bit different – the errors are added both to Connection_errors_max_connections and Connection_errors_internal.
      On MySQL 5.7/8.2 only Connection_errors_max_connections are increased, as expected.

      Attachments

        Activity

          Transition Time In Source Status Execution Times
          Oleksandr Byelkin made transition -
          Open In Progress
          147d 16h 25m 1
          Oleksandr Byelkin made transition -
          In Progress In Review
          56m 1
          Vladislav Vaintroub made transition -
          In Review Stalled
          1d 5h 53m 1
          Oleksandr Byelkin made transition -
          Stalled Closed
          3d 1h 23m 1

          People

            sanja Oleksandr Byelkin
            elenst Elena Stepanova
            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.