[ASK] MySQL Active Connections Banyak Banget

Discussion in 'Masalah Teknik dan Keamanan' started by pasaisea, 14 Apr 2016.

Thread Status:
Not open for further replies.
  1. pasaisea

    pasaisea Beginner 2.0

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Permisi saya mau tanya kenapa ya di server yang saya buat mendadak connectionnys bisa sampai belasan ribu. Padahal sebelumnya ga seperti ini. Kalau saya coba status:

    mysql> show status like '%onn%';
    +--------------------------------------------------------------------+-------+
    | Variable_name | Value |
    +-------------------------------------------------------------------+-------+
    | Aborted_connects | 10 |
    | Connection_errors_accept | 0 |
    | Connection_errors_internal | 0 |
    | Connection_errors_max_connections | 13 |
    | Connection_errors_peer_address | 0 |
    | Connection_errors_select | 0 |
    | Connection_errors_tcpwrap | 0 |
    | Connections | 14012 |
    | Max_used_connections | 152 |
    | Performance_schema_session_connect_attrs_lost | 0 |
    | Ssl_client_connects | 0 |
    | Ssl_connect_renegotiates | 0 |
    | Ssl_finished_connects | 0 |
    | Threads_connected | 12 |
    +-----------------------------------------------------------------------+-------+
    14 rows in set (0,05 sec)

    Terus kalau saya coba netstat -s hasilnya:

    Tcp:
    23657 active connections openings
    49210 passive connection openings
    525 failed connection attempts
    7395 connection resets received
    163 connections established
    2217790 segments received
    2384811 segments send out
    68800 segments retransmited
    19 bad segments received.
    9659 resets sent
    Udp:
    559532 packets received
    12260 packets to unknown port received.
    0 packet receive errors
    849797 packets sent
    SndbufErrors: 2
    IgnoredMulti: 26182

    Ini apakah normal untuk server yang menampung hanya 1 website dan mail perusahaan untuk active dan passive connectionnya sebanyak ini? Cara ngekill connectionsnya dan agar ga bikin2 koneksi baru lagi gimana ya?

    Mohon saran dan pendapatnya
     
  2. galuh82

    galuh82 Hosting Guru Web Hosting (Company)

    Messages:
    2,514
    Likes Received:
    186
    Trophy Points:
    63
    ada banyak kemungkinan, bisa karena banyak trafik atau munkin banyak proses yang ngegantung (i/o hardisk tinggi) dst .. mungkin temen2 yang lain bisa menambahkan ..

    kalau untuk mengurangi jumlah koneksi, bisa di my.cnf .. kalau kill proses mungkin bisa dengan restart servicenya CMIIW
     
  3. pasaisea

    pasaisea Beginner 2.0

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    @galuh82 Ini apakah normal ya kalau web & mail server dedicated seperti ini. Kalau di salah satu server masbro command mysql> show status like '%onn%'; dan netstat -s hasilnya apakah hasilnya lebih besar atau lebih kecil daripada saya?

    | Connections | 14012 |

    terus

    Tcp:
    23657 active connections openings
    49210 passive connection openings

    Soalnya saya baru pertama kali bikin web server private perusahaan sendiri dan saya tidak tahu defaultnya itu berapa idealnya

    Makasih atas bantuannya
     
Loading...
Thread Status:
Not open for further replies.

Share This Page

Loading...