Join the community today
Become a Member

MariaDB Site stopped working

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by sepulchre, Feb 28, 2020.

  1. sepulchre

    sepulchre Member

    167
    22
    18
    Dec 22, 2014
    Ratings:
    +28
    Local Time:
    3:48 PM
    Please help.

    My site can't be accessed anymore. I cannot restart mariadb with "service mysqld restart"

    Code:
    Redirecting to /bin/systemctl restart mysqld.service
    
    Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.



    Please fill in any relevant information that applies to you:
    • CentOS Version: 7
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed:latest
    • PHP Version Installed: 7.3
    • MariaDB MySQL Version Installed: 10.3
    • When was last time updated Centmin Mod code base ? : a month ago
    • Persistent Config: Do you have any persistent config file options set in /etc/centminmod/custom_config.inc ? You can check via this command:
      Code (Text):
      cat /etc/centminmod/custom_config.inc
      

      Post output in CODE tags.
     
  2. eva2000

    eva2000 Administrator Staff Member

    47,474
    10,760
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,718
    Local Time:
    12:48 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Check for the obvious i.e. running out of disk free space
    Code (Text):
    df -hT


    You can check your mysql error log which is listed along with all other log file locations as per How to troubleshoot Centmin Mod initial install issues (/var/log/mysqld.log) for clues or if on CentOS 7 the error log can be inspected via journalctl command.

    For CentOS 7

    Full log entries
    Code (Text):
    journalctl -u mariadb --no-pager | sed -e "s|$(hostname)|hostname|g"

    Or display last 100 lines via tail command
    Code (Text):
    journalctl -u mariadb --no-pager | sed -e "s|$(hostname)|hostname|g" | tail -100


    For CentOS 6

    Full log entries
    Code (Text):
    cat /var/log/mysqld.log | sed -e "s|$(hostname)|hostname|g"

    Or display last 100 lines via tail command
    Code (Text):
    tail -100 /var/log/mysqld.log | sed -e "s|$(hostname)|hostname|g"
     
  3. sepulchre

    sepulchre Member

    167
    22
    18
    Dec 22, 2014
    Ratings:
    +28
    Local Time:
    3:48 PM
    Wasn't at home, so couldn't check back earlier.

    Yeah, the disk space was the problem. My backups took the whole space. I will check the logs for more.

    Everything worked and then a second later it stopped working, it gave me a heart attack. Now all good again, thank you!
     
  4. eva2000

    eva2000 Administrator Staff Member

    47,474
    10,760
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,718
    Local Time:
    12:48 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    from advanced install guide at https://servermanager.guide/117/centmin-mod-advanced-customised-installation-guide/ you can setup disk space alerts

    run commands in SSH
    Code (Text):
    # set your email address you want to receive alerts and server emails
    EMAIL=youremail@address.com
    
    # setup email alerts for diskalert cronjob /etc/cron.daily/diskalert
    # https://community.centminmod.com/posts/59973/
    sed -i "s|EMAIL=.*|EMAIL='$EMAIL'|" /etc/cron.daily/diskalert