optimization – MySQL Aborted Connections


we have a dedicated MariaDb 10.5 (on openshift / docker) server with 32GB / 16 cpu and for some reason we keep getting errors like:

(Warning) Aborted connection 15072644 to db: ‘unconnected’ user: ‘unauthenticated’ host: ‘connecting host’ (Out of memory.)

But when looking at Graphana we don’t see any peak in memory usage

enter image description here

I’ve tried to modify the

 max_allowed_packet to 512M ## instead of 128M

enter image description here

But i think it made things worse , that server has 35 databases each containing about 210 tables

Here is the cnf file we use :

    skip-external-locking
    skip-name-resolve = 1
    innodb_file_per_table = 1

    innodb_flush_log_at_trx_commit = 2
    innodb_flush_method=O_DIRECT
    key_buffer_size         = 16M
    max_allowed_packet      = 512M
    thread_stack            = 192K
    thread_cache_size       = 64
    table_open_cache        = 4500
    join_buffer_size        = 1M
    max_connections         = 2500
    wait_timeout            = 100
    interactive_timeout     = 20
    innodb_buffer_pool_size = 24G 
    # Set .._log_file_size to 25 % of buffer pool size
    innodb_log_file_size    = 1G
    #innodb_log_buffer_size  = 512M
    # Remove the STRICT_TRANS_TABLES which was added as default by MariaDB After 10.2.4
    sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

    tmp_table_size                 = 256M
    max_heap_table_size            = 256M
    #maximum size of a single resultset in the cache.
    query_cache_limit              = 2M
    #maximum amount of data that may be stored in the cache
    query_cache_size               = 0
    query_cache_type               = 0

    log_bin         = /logs/mysql/mysql-bin.log
    expire_logs_days    = 2
    max_binlog_size         = 100M

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Any idea what we are doing wrong?