mysqld service stops once a day on ec2 server

前端 未结 6 455
孤城傲影
孤城傲影 2020-12-12 12:53

Environment Details:

Server: Amazon ec2 Linux
Web Server: Apache
Web Framework: Django with mod_wsgi

Following I have found in the mysql_er

6条回答
  •  情歌与酒
    2020-12-12 13:39

    Increasing the available RAM by adding new Swap space might also help. Steps are here

    Make sure that you create /swapfile of the size smaller than the available space shown by

    df -h
    

    For example for me output of df- h was:

    Filesystem      Size  Used Avail Use% Mounted on
    /dev/xvda1      7.8G  1.2G  6.3G  16% /
    none            4.0K     0  4.0K   0% /sys/fs/cgroup
    udev            492M   12K  492M   1% /dev
    tmpfs           100M  336K   99M   1% /run
    

    So I created using 2 G

    sudo fallocate -l 2G /swapfile
    

    And then just start the service

    sudo /etc/init.d/mysql restart
    

    Hope this helps. All the best.

提交回复
热议问题