Get the most out of your Centmin Mod LEMP stack
Become a Member

Nginx Got echo: write error: Disk quota exceeded error.

Discussion in 'Install & Upgrades or Pre-Install Questions' started by pheonis, Apr 9, 2019.

  1. pheonis

    pheonis Member

    62
    3
    8
    Dec 21, 2018
    Ratings:
    +4
    Local Time:
    2:34 PM
    Please fill in any relevant information that applies to you:
    • CentOS Version: iCentOS 7 64bit ?
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: i.e. 1.15.3
    • PHP Version Installed:7.2.9
    • MariaDB MySQL Version Installed: 10.2.xx
    • When was last time updated Centmin Mod code base ? : i.e. run centmin.sh menu option 23 submenu option 2 or cmupdate command
    • 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
      
    Output
    Code (Text):
    
    NGINX_PAGESPEED=y
    NGXDYNAMIC_NGXPAGESPEED=y
    You have new mail in /var/spool/mail/root
    

    Hi @eva2000
    I got Got echo: write error: Disk quota exceeded error. and i noticed my harddisk space is filling at 1gb/week.
    I followed your guide and did this
    Code:
    
    [08:40][root@hostname dev]# cd /usr/local/nginxbackup
    [08:42][root@hostname nginxbackup]# dir
    confbackup  nginxdirbackup
    [08:42][root@hostname nginxbackup]# rm -rf /usr/local/nginxbackup/nginxdirbackup/*
    [08:42][root@hostname nginxbackup]# rm -rf /usr/local/nginxbackup/confbackup/*
    [08:42][root@hostname nginxbackup]# ccache -C
    Cleared cache
    [08:42][root@hostname nginxbackup]# cd /svr-setup/
    [08:42][root@hostname svr-setup]# rm -rf /svr-setup/*
    [08:43][root@hostname svr-setup]# df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/simfs       15G   15G  699M  96% /
    devtmpfs        1.0G     0  1.0G   0% /dev
    tmpfs           1.0G     0  1.0G   0% /dev/shm
    tmpfs           1.0G  208K  1.0G   1% /run
    tmpfs           1.0G     0  1.0G   0% /sys/fs/cgroup
    tmpfs           205M     0  205M   0% /run/user/0
    
    I want to make sure the hard disk space does not gets filled up so quickly. How can i stop that?

     
  2. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    7:04 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Might want to check out these threads which will shed some light :)
    Basically you're or maybe now using more disk space than you have available and need to upgrade your disk space on your VPS or move to VPS with more disk space

    You can use these commands to find where the disk space usage is going but do not go blindly deleting data as some of it would be for system operation so you can break your server deleting incorrect data.

    Code (Text):
    df -h
    du -h --max-depth=1 /
    du -h --max-depth=1 /home
    du -h --max-depth=1 /usr
    du -h --max-depth=1 /var
    

    For Centmin Mod Nginx vhost specific i.e. where you upload your site's files for your site files etc.
    Code (Text):
    du -h --max-depth=1 /home/nginx/domains
    

    any sensitive directory names for your site files etc can be masked by you manually as you don't want to publicly list them if possible
     
  3. pheonis

    pheonis Member

    62
    3
    8
    Dec 21, 2018
    Ratings:
    +4
    Local Time:
    2:34 PM
    Hi @eva2000 , I have got the issue.The wp fastest cache was not deleting the files inside cache/all, cahce/wmac and cache/wpfc-minified. So i deletedthem manually. Now i get database connection error.
    I ran
    Code:
    systemctl status mariadb.service
    Now getting this error
    Code:
    * mariadb.service - MariaDB 10.1.37 database server
       Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
      Drop-In: /etc/systemd/system/mariadb.service.d
               `-migrated-from-my.cnf-settings.conf, openfileslimit.conf, protecthome.conf
       Active: failed (Result: exit-code) since Tue 2019-04-09 16:30:03 UTC; 10s ago
         Docs: man:mysqld(8)
               https://mariadb.com/kb/en/library/systemd/
      Process: 3488 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
      Process: 3215 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
      Process: 3212 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
     Main PID: 3488 (code=exited, status=1/FAILURE)
       Status: "MariaDB server is down"
    
    Apr 09 16:30:01 hostname mysqld[3488]: 2019-04-09 16:30:01 140701787728128 [Note] Plugin 'FEEDBACK' is disabled.
    Apr 09 16:30:01 hostname mysqld[3488]: 2019-04-09 16:30:01 140701787728128 [Note] Recovering after a crash using tc.log
    Apr 09 16:30:01 hostname mysqld[3488]: 2019-04-09 16:30:01 140701787728128 [ERROR] Bad magic header in tc log
    Apr 09 16:30:01 hostname mysqld[3488]: 2019-04-09 16:30:01 140701787728128 [ERROR] Crash recovery failed. Either correct the probl...ollback}
    Apr 09 16:30:01 hostname mysqld[3488]: 2019-04-09 16:30:01 140701787728128 [ERROR] Can't init tc log
    Apr 09 16:30:01 hostname mysqld[3488]: 2019-04-09 16:30:01 140701787728128 [ERROR] Aborting
    Apr 09 16:30:03 hostname systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
    Apr 09 16:30:03 hostname systemd[1]: Failed to start MariaDB 10.1.37 database server.
    Apr 09 16:30:03 hostname systemd[1]: Unit mariadb.service entered failed state.
    Apr 09 16:30:03 hostname systemd[1]: mariadb.service failed.
    Hint: Some lines were ellipsized, use -l to show in full.
    
    I am in stuck here.
     
  4. pheonis

    pheonis Member

    62
    3
    8
    Dec 21, 2018
    Ratings:
    +4
    Local Time:
    2:34 PM
    Hi, I resolve it by renaming the tc.log file.
     
  5. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    7:04 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    yeah you have to make sure directories have correct permissions and owner/group for nginx user/group
    yup that would work