Database Sering Mati

Discussion in 'VPS (Virtual Private Server)' started by alidabdul, 10 Oct 2014.

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

    alidabdul Beginner 2.0

    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Kesel setiap kali web saya muncul keterangan:
    Error establishing a database connection
    Kan capek setiap kali harus restart service Mysql di ssh >_< ada gak sih trik biar gak matian mulu mysqlnya? Atau kalau mati otomatis restart sendiri gitu. Saya pake webuzo di Centos.


    Matur Suwun
     
  2. kang28ivan

    kang28ivan Expert 1.0

    Messages:
    766
    Likes Received:
    168
    Trophy Points:
    43
    Wah kurang ngerti sama webuzo, kalau dulu coba di vps untuk trafik besar emang sering mati dan kadang settingan jadi ancur ilang semua.
    Coba pake kloxo-mr saja biar lebih fungsional + lebih effektiv pake kloxo-mr kalau saya.
     
  3. voezie

    voezie Hosting Guru

    Messages:
    1,771
    Likes Received:
    212
    Trophy Points:
    63
    Coba upgrade ram / cpu nya.
     
  4. decepticons

    decepticons Beginner 2.0

    Messages:
    29
    Likes Received:
    2
    Trophy Points:
    3
    Setuju Tuan, sepertinya kekurangan resource RAM
     
  5. mustafaramadhan

    mustafaramadhan Hosting Guru

    Messages:
    3,237
    Likes Received:
    857
    Trophy Points:
    113
    Bisa jadi memang kehabisan memory karena mysql pakai innodb sebagai storage-engine. Coba saja buat cron-job harian untuk restart sql,
     
  6. junior riau

    junior riau Hosting Guru Web Hosting

    Messages:
    3,227
    Likes Received:
    514
    Trophy Points:
    113
    kurang ram paling
     
  7. alidabdul

    alidabdul Beginner 2.0

    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    upgrade RAM berarti nambah dolar dong T____T

    Nah ini gimana caranya bkin cron job, oke gugling. Masalahnya ini tiap menit padahal traffic gak tinggi juga huft :(
     
  8. mnordins

    mnordins Apprentice 1.0

    Messages:
    527
    Likes Received:
    65
    Trophy Points:
    28
    untuk memastikan, coba check lognya dulu... errornya kekurangan ram (akibat innodb) atau faktor lain...
     
  9. alidabdul

    alidabdul Beginner 2.0

    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Ini lognya,,, klo seperti ini kenapa?

    141009 23:30:15 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    141009 23:30:15 InnoDB: The InnoDB memory heap is disabled
    141009 23:30:15 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
    141009 23:30:15 InnoDB: Compressed tables use zlib 1.2.3
    141009 23:30:15 InnoDB: Initializing buffer pool, size = 128.0M
    141009 23:30:15 InnoDB: Completed initialization of buffer pool
    141009 23:30:15 InnoDB: highest supported file format is Barracuda.
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141009 23:30:15 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141009 23:30:15 InnoDB: Waiting for the background threads to start
    141009 23:30:16 InnoDB: 5.5.39 started; log sequence number 28687673
    141009 23:30:16 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
    141009 23:30:16 [Note] - '0.0.0.0' resolves to '0.0.0.0';
    141009 23:30:16 [Note] Server socket created on IP: '0.0.0.0'.
    141009 23:30:16 [Note] Event Scheduler: Loaded 0 events
    141009 23:30:16 [Note] /usr/local/apps/mysql/bin/mysqld: ready for connections.
    Version: '5.5.39' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
    141009 23:30:23 [Note] /usr/local/apps/mysql/bin/mysqld: Normal shutdown

    141009 23:30:23 [Note] Event Scheduler: Purging the queue. 0 events
    141009 23:30:23 InnoDB: Starting shutdown...
    141009 23:30:23 InnoDB: Shutdown completed; log sequence number 28687673
    141009 23:30:23 [Note] /usr/local/apps/mysql/bin/mysqld: Shutdown complete

    141009 23:30:23 mysqld_safe mysqld from pid file /var/lib/mysql/mysqld.pid ended
    141009 23:30:24 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    141009 23:30:24 InnoDB: The InnoDB memory heap is disabled
    141009 23:30:24 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
    141009 23:30:24 InnoDB: Compressed tables use zlib 1.2.3
    141009 23:30:24 InnoDB: Initializing buffer pool, size = 128.0M
    141009 23:30:24 InnoDB: Completed initialization of buffer pool
    141009 23:30:24 InnoDB: highest supported file format is Barracuda.
    141009 23:30:24 InnoDB: Waiting for the background threads to start
    141009 23:30:25 InnoDB: 5.5.39 started; log sequence number 28687673
    141009 23:30:25 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
    141009 23:30:25 [Note] - '0.0.0.0' resolves to '0.0.0.0';
    141009 23:30:25 [Note] Server socket created on IP: '0.0.0.0'.
    141009 23:30:25 [Note] Event Scheduler: Loaded 0 events
    141009 23:30:25 [Note] /usr/local/apps/mysql/bin/mysqld: ready for connections.
    Version: '5.5.39' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
    141009 23:30:27 [Note] /usr/local/apps/mysql/bin/mysqld: Normal shutdown

    141009 23:30:27 [Note] Event Scheduler: Purging the queue. 0 events
    141009 23:30:27 InnoDB: Starting shutdown...
    141009 23:30:28 InnoDB: Shutdown completed; log sequence number 28687673
    141009 23:30:28 [Note] /usr/local/apps/mysql/bin/mysqld: Shutdown complete

    141009 23:30:28 mysqld_safe mysqld from pid file /var/lib/mysql/mysqld.pid ended
    141009 23:30:29 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    141009 23:30:29 InnoDB: The InnoDB memory heap is disabled
    141009 23:30:29 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
    141009 23:30:29 InnoDB: Compressed tables use zlib 1.2.3
    141009 23:30:29 InnoDB: Initializing buffer pool, size = 128.0M
    141009 23:30:29 InnoDB: Completed initialization of buffer pool
    141009 23:30:29 InnoDB: highest supported file format is Barracuda.
    141009 23:30:29 InnoDB: Waiting for the background threads to start
    141009 23:30:30 InnoDB: 5.5.39 started; log sequence number 28687673
    141009 23:30:30 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
    141009 23:30:30 [Note] - '0.0.0.0' resolves to '0.0.0.0';
    141009 23:30:30 [Note] Server socket created on IP: '0.0.0.0'.
    141009 23:30:30 [Note] Event Scheduler: Loaded 0 events
    141009 23:30:30 [Note] /usr/local/apps/mysql/bin/mysqld: ready for connections.
    Version: '5.5.39' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
    141009 23:38:56 mysqld_safe Number of processes running now: 0
    141009 23:38:56 mysqld_safe mysqld restarted
    141009 23:38:58 InnoDB: The InnoDB memory heap is disabled
    141009 23:38:58 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
    141009 23:38:58 InnoDB: Compressed tables use zlib 1.2.3
    141009 23:38:58 InnoDB: Initializing buffer pool, size = 128.0M
    InnoDB: mmap(136675328 bytes) failed; errno 12
    141009 23:38:58 InnoDB: Completed initialization of buffer pool
    141009 23:38:58 InnoDB: Fatal error: cannot allocate memory for the buffer pool
    141009 23:38:58 [ERROR] Plugin 'InnoDB' init function returned error.
    141009 23:38:58 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    141009 23:38:58 [ERROR] Unknown/unsupported storage engine: InnoDB
    141009 23:38:58 [ERROR] Aborting

    141009 23:38:58 [Note] /usr/local/apps/mysql/bin/mysqld: Shutdown complete

    141009 23:38:58 mysqld_safe mysqld from pid file /var/lib/mysql/mysqld.pid ended
     
  10. mnordins

    mnordins Apprentice 1.0

    Messages:
    527
    Likes Received:
    65
    Trophy Points:
    28
    Kayaknya itu sumber masalahnya mas, alternatif solusinya :
    1. Convert InnoDB ke MyISAM, dan modifikasi my.cnf (skip innodb)
    2. Tambah RAM

    Abis itu, hapus semua file ib_logfile dan semua file ibdata dari /var/lib/mysql, dan restart mysql servicenya

    Tips :
    Alangkah lebih baik coba tuning mysql/mariadb nya dulu, sebelum masuk tahapan production-server
     
Loading...
Thread Status:
Not open for further replies.

Share This Page

Loading...