MySQL dies after a while


  • Moderator

    Server
    • FOG Version: 1.3.0 working-RC-11 Version 54
    • OS: Fedora 24 Server x64
    Description

    MySQL/MariaDB dies after a while of inactivity. Restarting it brings it back. This is my home fog setup - it’s not under any kind of load at all. This has been happening to me only on working-RC-11. I’ve not been able to put a finger on what’s causing it other than simply time passing.

    [root@fog-server ~]# mysql -D fog
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111 "Connection refused")
    [root@fog-server ~]# systemctl status mysql
    ● mariadb.service - MariaDB 10.1 database server
       Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
       Active: inactive (dead)
    [root@fog-server ~]# systemctl status mariadb
    ● mariadb.service - MariaDB 10.1 database server
       Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
       Active: inactive (dead)
    

    0_1474637945444_Invalid DB.png


  • Senior Developer

    @Wayne-Workman you might want to use systemctl -l status mariadb as it will give more direct errors to what caused it to die to begin with.


  • Moderator

    I setup a simple shell script to monitor mariaDB’s status:

    while true; do
    date >> /root/mariadb.log
    systemctl status mariadb >> /root/mariadb.log
    sleep 60
    done
    

    And started it with the no hangup command, and backgrounded the process:
    nohup ./monitorService.sh &

    So I’ll be able to give some sort of timeframe of when this happens. Maybe there will be a pattern.


  • Senior Developer

    @Wayne-Workman can you update to latest? I’ve reintroduced the persistent connections. I think there may be some cleanup on systemd that’s checking for “stale” sockets. Using persistent connections might ensure the socket doesn’t appear stale, or I don’t know. Maybe some other os update introduced something we are unaware of.


Log in to reply
 

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.