The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

high number of aborted connection

Discussion in 'Workarounds and Optimization' started by kaplan, Jan 23, 2014.

  1. kaplan

    kaplan Registered

    Joined:
    Jan 22, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,
    The number of aborted connections has become very high.
    I think i have a big problem with my.cnf

    could you help me?
    thank's a lot...

    mysqltuner result :
    Code:
    -------- General Statistics --------------------------------------------------
    [--] Skipped version check for MySQLTuner script
    [OK] Currently running supported MySQL version 5.5.30-log
    [OK] Operating on 64-bit architecture
    
    -------- Storage Engine Statistics -------------------------------------------
    [--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
    [--] Data in MyISAM tables: 681M (Tables: 922)
    [--] Data in InnoDB tables: 55M (Tables: 489)
    [--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
    [!!] Total fragmented tables: 514
    
    -------- Security Recommendations  -------------------------------------------
    [OK] All database users have passwords assigned
    
    -------- Performance Metrics -------------------------------------------------
    [--] Up for: 1d 3h 26m 19s (2M q [20.290 qps], 1M conn, TX: 2B, RX: 452M)
    [--] Reads / Writes: 85% / 15%
    [--] Total buffers: 8.6G global + 14.5M per thread (500 max threads)
    [OK] Maximum possible memory usage: 15.7G (66% of installed RAM)
    [OK] Slow queries: 0% (1/2M)
    [OK] Highest usage of available connections: 13% (65/500)
    [OK] Key buffer size / total MyISAM indexes: 8.0G/318.3M
    [OK] Key buffer hit rate: 100.0% (3B cached / 267K reads)
    [!!] Query cache efficiency: 17.6% (245K cached / 1M selects)
    [!!] Query cache prunes per day: 67418
    [OK] Sorts requiring temporary tables: 0% (35 temp sorts / 764K sorts)
    [!!] Temporary tables created on disk: 39% (450K on disk / 1M total)
    [OK] Thread cache hit rate: 99% (68 created / 1M connections)
    [OK] Table cache hit rate: 42% (2K open / 4K opened)
    [OK] Open file limit used: 18% (2K/12K)
    [OK] Table locks acquired immediately: 99% (2M immediate / 2M locks)
    [!!] Connections aborted: 92%
    [!!] InnoDB data size / buffer pool: 55.3M/8.0M
    
    -------- Recommendations -----------------------------------------------------
    General recommendations:
        Run OPTIMIZE TABLE to defragment tables for better performance
        Temporary table size is already large - reduce result set size
        Reduce your SELECT DISTINCT queries without LIMIT clauses
        Your applications are not closing MySQL connections properly
    Variables to adjust:
        query_cache_limit (> 148M, or use smaller result sets)
        query_cache_size (> 128M)
        innodb_buffer_pool_size (>= 55M)

    result tuning-primer
    Code:
    SLOW QUERIES
    The slow query log is enabled.
    Current long_query_time = 3.000000 sec.
    You have 1 out of 2011708 that take longer than 3.000000 sec. to complete
    Your long_query_time seems to be fine
    
    BINARY UPDATE LOG
    The binary update log is NOT enabled.
    You will not be able to do point in time recovery
    See http://dev.mysql.com/doc/refman/5.5/en/point-in-time-recovery.html
    
    WORKER THREADS
    Current thread_cache_size = 16384
    Current threads_cached = 67
    Current threads_per_sec = 0
    Historic threads_per_sec = 0
    Your thread_cache_size is fine
    
    MAX CONNECTIONS
    Current max_connections = 500
    Current threads_connected = 1
    Historic max_used_connections = 65
    The number of used connections is 13% of the configured maximum.
    Your max_connections variable seems to be fine.
    
    INNODB STATUS
    Current InnoDB index space = 43 M
    Current InnoDB data space = 55 M
    Current InnoDB buffer pool free = 0 %
    Current innodb_buffer_pool_size = 8 M
    Depending on how much space your innodb indexes take up it may be safe
    to increase this value to up to 2 / 3 of total system memory
    
    MEMORY USAGE
    Max Memory Ever Allocated : 9.06 G
    Configured Max Per-thread Buffers : 7.08 G
    Configured Max Global Buffers : 8.14 G
    Configured Max Memory Limit : 15.22 G
    Physical Memory : 23.58 G
    Max memory limit seem to be within acceptable norms
    
    KEY BUFFER
    Current MyISAM index space = 318 M
    Current key_buffer_size = 8.00 G
    Key cache miss rate is 1 : 14707
    Key buffer free ratio = 81 %
    Your key_buffer_size seems to be too high.
    Perhaps you can use these resources elsewhere
    
    QUERY CACHE
    Query cache is enabled
    Current query_cache_size = 128 M
    Current query_cache_used = 87 M
    Current query_cache_limit = 148 M
    Current Query cache Memory fill ratio = 68.69 %
    Current query_cache_min_res_unit = 4 K
    MySQL won't cache query results that are larger than query_cache_limit in size
    
    SORT OPERATIONS
    Current sort_buffer_size = 2 M
    Current read_rnd_buffer_size = 256 K
    Sort buffer seems to be fine
    
    JOINS
    Current join_buffer_size = 8.00 M
    You have had 22 queries where a join could not use an index properly
    join_buffer_size >= 4 M
    This is not advised
    You should enable "log-queries-not-using-indexes"
    Then look for non indexed joins in the slow query log.
    
    OPEN FILES LIMIT
    Current open_files_limit = 12510 files
    The open_files_limit should typically be set to at least 2x-3x
    that of table_cache if you have heavy MyISAM usage.
    Your open_files_limit value seems to be fine
    
    TABLE CACHE
    Current table_open_cache = 6000 tables
    Current table_definition_cache = 5000 tables
    You have a total of 1452 tables
    You have 2022 open tables.
    The table_cache value seems to be fine
    
    TEMP TABLES
    Current max_heap_table_size = 512 M
    Current tmp_table_size = 512 M
    Of 683409 temp tables, 39% were created on disk
    Perhaps you should increase your tmp_table_size and/or max_heap_table_size
    to reduce the number of disk-based temporary tables
    Note! BLOB and TEXT columns are not allow in memory tables.
    If you are using these columns raising these values might not impact your
    ratio of on disk temp tables.
    
    TABLE SCANS
    Current read_buffer_size = 4 M
    Current table scan ratio = 750 : 1
    read_buffer_size seems to be fine
    
    TABLE LOCKING
    Current Lock Wait ratio = 1 : 227
    You may benefit from selective use of InnoDB.

    my.cnf
    Code:
    [mysqld]
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    user=mysql
    # Disabling symbolic-links is recommended to prevent assorted security risks
    symbolic-links=0
    
    # Semisynchronous Replication
    # http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html
    # uncomment next line on MASTER
    ;plugin-load=rpl_semi_sync_master=semisync_master.so
    # uncomment next line on SLAVE
    ;plugin-load=rpl_semi_sync_slave=semisync_slave.so
    
    # Others options for Semisynchronous Replication
    ;rpl_semi_sync_master_enabled=1
    ;rpl_semi_sync_master_timeout=10
    ;rpl_semi_sync_slave_enabled=1
    
    # http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html
    ;performance_schema
    
    query_cache_size=128M
    query_cache_limit=148M
    log-queries-not-using-indexes=/var/log/mysql/mysql-index.log
    table_cache=6000
    table_definition_cache=5000
    max_heap_table_size=512M
    tmp_table_size=512M
    thread_cache_size = 50K
    max_connections = 500
    key_buffer_size=8G
    join_buffer_size=8M
    read_buffer_size = 4M
    long_query_time =3
    log_slow_queries=/var/log/mysql/mysql-slow.log
    innodb_buffer_pool_size = 8M
    low_priority_updates=1
    concurrent_insert=ALWAYS
    skip-host-cache
    skip-name-resolve
    ft_min_word_len=3
    wait_timeout = 30
    connect_timeout = 10
    interactive_timeout = 10
    [mysqld_safe]
    log-error=/var/log/mysqld.log
    pid-file=/var/run/mysqld/mysqld.pid
    
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You may want to check the MySQL error log (/var/lib/mysql/$hostname.err) to see if you can determine where the MySQL aborted connections are coming from. Make sure any scripts that utilize the MySQL root password are using the correct one.

    Thank you.
     
Loading...

Share This Page