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.

mysql uptime - never more than 60 minutes

Discussion in 'Workarounds and Optimization' started by felz, Oct 22, 2013.

  1. felz

    felz Member

    Joined:
    Aug 4, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    hello, there is something wrong with my mysql, I let my server stand for 1 day and I did not do anything, but when I check mysql uptime is always less than 60 minutes, who might restart the mysql-server?
    below is mysqltuner.pl :

    Code:
    -------- General Statistics --------------------------------------------------
    [--] Skipped version check for MySQLTuner script
    [OK] Currently running supported MySQL version 5.5.30-cll
    [OK] Operating on 32-bit architecture with less than 2GB RAM
    
    -------- Storage Engine Statistics -------------------------------------------
    [--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
    [--] Data in MyISAM tables: 165M (Tables: 278)
    [--] Data in InnoDB tables: 48K (Tables: 3)
    [--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
    [!!] Total fragmented tables: 18
    
    -------- Security Recommendations  -------------------------------------------
    [OK] All database users have passwords assigned
    
    -------- Performance Metrics -------------------------------------------------
    [--] Up for: 48m 35s (626K q [215.069 qps], 7K conn, TX: 2B, RX: 68M)
    [--] Reads / Writes: 90% / 10%
    [--] Total buffers: 592.0M global + 32.6M per thread (30 max threads)
    [OK] Maximum possible memory usage: 1.5G (76% of installed RAM)
    [OK] Slow queries: 0% (0/626K)
    [OK] Highest usage of available connections: 43% (13/30)
    [OK] Key buffer size / total MyISAM indexes: 64.0M/109.7M
    [OK] Key buffer hit rate: 100.0% (326M cached / 60K reads)
    [OK] Query cache efficiency: 80.0% (467K cached / 584K selects)
    [OK] Query cache prunes per day: 0
    [OK] Sorts requiring temporary tables: 6% (2K temp sorts / 43K sorts)
    [OK] Temporary tables created on disk: 22% (8K on disk / 37K total)
    [OK] Thread cache hit rate: 99% (74 created / 7K connections)
    [OK] Table cache hit rate: 98% (404 open / 411 opened)
    [OK] Open file limit used: 17% (688/4K)
    [OK] Table locks acquired immediately: 99% (153K immediate / 153K locks)
    [OK] InnoDB data size / buffer pool: 48.0K/128.0M
    
    -------- Recommendations -----------------------------------------------------
    General recommendations:
        Run OPTIMIZE TABLE to defragment tables for better performance
        MySQL started within last 24 hours - recommendations may be inaccurate
        Enable the slow query log to troubleshoot bad queries
    Load report :
    Code:
    12:50:01 AM         2       105      1.93      2.61      2.53
    12:55:01 AM         3       103      1.35      1.95      2.27
    01:00:01 AM         3       105      2.03      1.93      2.16
    01:05:01 AM         2       102      1.65      1.72      2.00
    01:10:01 AM         1       113      1.12      1.40      1.79
    01:15:01 AM         6       104      1.85      1.56      1.74
    01:20:01 AM         3       105      2.23      2.08      1.91
    01:25:01 AM         1       106      1.50      1.82      1.86
    01:30:01 AM         2       103      1.53      1.51      1.69
    01:35:01 AM         5       105      2.71      3.26      2.45
    01:40:01 AM         6       108      2.31      2.27      2.22
    01:45:01 AM         1       102      2.42      2.54      2.36
    01:50:01 AM         3       105      2.54      2.34      2.27
    01:55:01 AM         1       100      1.80      1.99      2.14
    02:00:01 AM         2       103      1.37      1.50      1.87
    02:05:01 AM         2       103      1.41      1.73      1.89
    02:10:01 AM         1       107      2.38      2.25      2.08
    02:15:01 AM         5       104      1.60      2.04      2.04
    02:20:01 AM         2       103      2.20      2.11      2.05
    02:25:01 AM         3       105      1.43      1.66      1.86
    02:30:01 AM         4       118      3.45      2.29      2.05
    02:35:01 AM         3       105      2.03      2.01      1.96
    02:40:01 AM         3       105      1.99      1.89      1.91
    02:45:01 AM         1       102      1.82      1.77      1.83
    02:50:01 AM         4       107      1.58      1.74      1.79
    02:55:01 AM         2       102      0.79      1.28      1.58
    03:00:01 AM         2       103      1.07      1.13      1.42
    03:05:01 AM         2       103      0.49      0.90      1.25
    03:10:01 AM         4       109      1.36      1.25      1.30
    03:15:01 AM         2       101      1.62      1.49      1.38
    03:20:01 AM         2       104      0.96      1.32      1.34
    03:25:01 AM         6       106      1.26      1.25      1.30
    03:30:01 AM         6       103      1.90      1.48      1.38
    
    03:30:01 AM   runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15
    03:35:01 AM         3       106      2.37      2.06      1.64
    03:40:01 AM         2       105      1.63      1.67      1.58
    03:45:01 AM         1       102      1.74      1.78      1.65
    03:50:01 AM         2       103      1.22      1.57      1.60
    03:55:01 AM         1       103      1.72      1.82      1.71
    04:00:01 AM         3       106      1.76      1.75      1.69
    04:05:01 AM         1       105      1.79      1.87      1.76
    Average:            3       107      1.93      1.94      1.96
    
    my server specs : VPS with 2Gb of RAM, 24 core procs, SSD-RAID 10 DRIVE (node)

    thanks in advance
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    Please check the MySQL error log (/var/lib/mysql/$hostname.err) and see if you notice any particular error messages before each restart.

    Thank you.
     
  3. felz

    felz Member

    Joined:
    Aug 4, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    thanks Michael, I found this, but I dont understand what is the meaning of this log
    Code:
    131022  8:38:16 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!
    131022  8:38:16  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...
    131022  8:38:16  InnoDB: Waiting for the background threads to start
    131022  8:38:17 InnoDB: 5.5.30 started; log sequence number 3096099720
    131022  8:38:17 [Note] Event Scheduler: Loaded 0 events
    131022  8:38:17 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.5.30-cll'  socket: '/var/lib/mysql/mysql.sock'  port: 0  MySQL Community Server (GPL)
    131022 08:41:32 mysqld_safe Number of processes running now: 0
    131022 08:41:32 mysqld_safe mysqld restarted
    131022  8:41:32 [Warning] option 'table_cache': unsigned value 16777216 adjusted to 524288
    131022  8:41:32 [Warning] option 'table_open_cache': unsigned value 850000 adjusted to 524288
    131022  8:41:32 [Warning] Could not increase number of max_open_files to more than 4000 (request: 1048616)
    131022  8:41:32 [Note] Plugin 'FEDERATED' is disabled.
    131022  8:41:32 InnoDB: The InnoDB memory heap is disabled
    131022  8:41:32 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
    131022  8:41:32 InnoDB: Compressed tables use zlib 1.2.3
    131022  8:41:32 InnoDB: Using Linux native AIO
    131022  8:41:32 InnoDB: Initializing buffer pool, size = 128.0M
    131022  8:41:32 InnoDB: Completed initialization of buffer pool
    131022  8:41:32 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!
    131022  8:41:32  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...
    131022  8:41:32  InnoDB: Waiting for the background threads to start
    131022  8:41:33 InnoDB: 5.5.30 started; log sequence number 3096099720
    131022  8:41:33 [Note] Event Scheduler: Loaded 0 events
    131022  8:41:33 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.5.30-cll'  socket: '/var/lib/mysql/mysql.sock'  port: 0  MySQL Community Server (GPL)
    131022 09:08:27 mysqld_safe Number of processes running now: 0
    131022 09:08:27 mysqld_safe mysqld restarted
    131022  9:08:27 [Warning] option 'table_cache': unsigned value 16777216 adjusted to 524288
    131022  9:08:27 [Warning] option 'table_open_cache': unsigned value 850000 adjusted to 524288
    131022  9:08:27 [Warning] Could not increase number of max_open_files to more than 4000 (request: 1048616)
    131022  9:08:27 [Note] Plugin 'FEDERATED' is disabled.
    131022  9:08:27 InnoDB: The InnoDB memory heap is disabled
    131022  9:08:27 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
    131022  9:08:27 InnoDB: Compressed tables use zlib 1.2.3
    131022  9:08:27 InnoDB: Using Linux native AIO
    131022  9:08:27 InnoDB: Initializing buffer pool, size = 128.0M
    131022  9:08:27 InnoDB: Completed initialization of buffer pool
    131022  9:08:27 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!
    131022  9:08:27  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...
    131022  9:08:27  InnoDB: Waiting for the background threads to start
    131022  9:08:28 InnoDB: 5.5.30 started; log sequence number 3096099720
    131022  9:08:28 [Note] Event Scheduler: Loaded 0 events
    131022  9:08:28 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.5.30-cll'  socket: '/var/lib/mysql/mysql.sock'  port: 0  MySQL Community Server (GPL)
     
  4. felz

    felz Member

    Joined:
    Aug 4, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    is there any somewhere else to track mysql log? Im afraid i can not produce solution base on the log above
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You could also try running this command:

    Code:
    mysqladmin processlist
    It can tell you if any databases are more active than normal. You may want to consult with a qualified system administrator to examine your system and determine if there are any issues with MySQL usage.

    Thank you.
     
Loading...

Share This Page