MariaDB keeps stuttering and tables crash

Discussion in 'Installation/Configuration' started by ambidex, Mar 29, 2019.

  1. ambidex

    ambidex New Member

    Since yesterday, our ISPConfig server keeps getting stuttering database connections. I'm not sure what's causing this. Only strange thing I can find is that when I check the status (service mysql status) I see dbispconfig tables have crashed. Yesterday, I already repaired the tables (through PHPMyAdmin) and then restarted the server, after this `status` didn't show any crashed tables anymore. But today, again we had connection problems, when checking `status`, again tables seem to be broken (see below).

    How would I go about checking what's wrong? FWIW: This is a Digital Ocean droplet.

    Code:
    ● mysql.service - LSB: Start and stop the mysql database server daemon
       Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
       Active: active (running) since Thu 2019-03-28 16:22:51 CET; 16h ago
         Docs: man:systemd-sysv-generator(8)
      Process: 18655 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)
      Process: 18692 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)
        Tasks: 29
       Memory: 140.2M
          CPU: 5min 3.601s
       CGroup: /system.slice/mysql.service
               ├─11862 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-log-error --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
               ├─11863 logger -t mysqld -p daemon error
               └─18723 /bin/bash /usr/bin/mysqld_safe
    Mar 29 08:44:20 HOSTNAME mysqld[11863]: 190329  8:44:20 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.42-84.2 started; log sequence number 16627477474
    Mar 29 08:44:20 HOSTNAME mysqld[11863]: 190329  8:44:20 [Note] Plugin 'FEEDBACK' is disabled.
    Mar 29 08:44:20 HOSTNAME mysqld[11863]: 190329  8:44:20 [Note] Server socket created on IP: '::'.
    Mar 29 08:44:20 HOSTNAME mysqld[11863]: 190329  8:44:20 [Warning] 'user' entry '[email protected]' has both a password and an authentication plugin specified. The password will be ignored.
    Mar 29 08:44:20 HOSTNAME mysqld[11863]: 190329  8:44:20 [Note] /usr/sbin/mysqld: ready for connections.
    Mar 29 08:44:20 HOSTNAME mysqld[11863]: Version: '10.0.38-MariaDB-0ubuntu0.16.04.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Ubuntu 16.04
    Mar 29 08:44:22 HOSTNAME mysqld[11863]: 190329  8:44:22 [ERROR] mysqld: Table './dbispconfig/sys_cron' is marked as crashed and should be repaired
    Mar 29 08:44:22 HOSTNAME mysqld[11863]: 190329  8:44:22 [Warning] Checking table:   './dbispconfig/sys_cron'
    Mar 29 08:45:01 HOSTNAME mysqld[11863]: 190329  8:45:01 [ERROR] mysqld: Table './dbispconfig/monitor_data' is marked as crashed and should be repaired
    Mar 29 08:45:01 HOSTNAME mysqld[11863]: 190329  8:45:01 [Warning] Checking table:   './dbispconfig/monitor_data'
    Edit: FWIW, the errors for database mostly consist of
    SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
     
    Last edited: Mar 29, 2019
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Check with:

    df -h

    that the harddisk is not full.
     
  3. ambidex

    ambidex New Member

    Hi till!

    HDD's are not full:

    Code:
    Filesystem      Size  Used Avail Use% Mounted on
    udev            991M     0  991M   0% /dev
    tmpfs           201M   21M  180M  11% /run
    /dev/vda1        49G   16G   33G  32% /
    tmpfs          1001M     0 1001M   0% /dev/shm
    tmpfs           5.0M  4.0K  5.0M   1% /run/lock
    tmpfs          1001M     0 1001M   0% /sys/fs/cgroup
    /dev/vda15      105M  3.4M  101M   4% /boot/efi
    /dev/sda        100G   12G   83G  12% /mnt/volume_ams3_02
    tmpfs           201M     0  201M   0% /run/user/1000
    tmpfs           201M     0  201M   0% /run/user/5013
    
     
    Last edited: Mar 29, 2019
  4. ambidex

    ambidex New Member

    Found it in "Show System-log" in ISPconfig.

    Code:
    Mar 29 11:09:03 svr-do-5 kernel: [6725329.995388] Out of memory: Kill process 29208 (mysqld) score 97 or sacrifice child
    Mar 29 11:09:03 svr-do-5 kernel: [6725329.998012] Killed process 29208 (mysqld) total-vm:619184kB, anon-rss:199164kB, file-rss:0kB
    Apparently it runs out of memory. I also noticed this server does not have any swap allocated. I'm going to add swap space to make sure it has enough memory to get around.
     

Share This Page