0

Im running Mariadb on dedicated server with Debian Jessie suddenly get shut down when i try to start mysql it gives me this error:

Dec 31 20:18:20  mysqld[6630]: 2016-12-31 20:18:20 140334745393088 [Note] /usr/sbin/mysqld (mysqld 10.1.20-MariaDB-1~jessie) starting as process 6630 ...
Dec 31 20:19:50  systemd[1]: mariadb.service start operation timed out. Terminating.
Dec 31 20:20:32  systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
Dec 31 20:20:32  systemd[1]: Failed to start MariaDB database server.
Dec 31 20:20:32  systemd[1]: Unit mariadb.service entered failed state.

the output of error.log shows something related to space how can resolve it

    2016-12-31 19:33:06 140069282318080 [Warning] mysqld: Disk is full writing '/var/lib/mysql/oem1/oempro_log_campaign_sends.MYI' (Errcode: 28 "No space left on device"). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing disk space)
2016-12-31 19:33:06 140069282318080 [Warning] mysqld: Retry in 60 secs. Message reprinted in 600 secs

here's my server disk space:

    root@dc:/var/lib/mysql# df
Filesystem     1K-blocks      Used Available Use% Mounted on
/dev/sda3      106882096 101403084     26624 100% /
udev               10240         0     10240   0% /dev
tmpfs            1604908    164396   1440512  11% /run
tmpfs            4012268         0   4012268   0% /dev/shm
tmpfs               5120         0      5120   0% /run/lock
tmpfs            4012268         0   4012268   0% /sys/fs/cgroup
/dev/sda1         474730     32398    413302   8% /boot
/dev/sdb1      115247656     61060 109309248   1% /home
Omer Stimpack
  • 205
  • 1
  • 3
  • 12

1 Answers1

1

2016-12-31 19:33:06 140069282318080 [Warning] mysqld: Disk is full writing '/var/lib/mysql/oem1/oempro_log_campaign_sends.MYI' (Errcode: 28 "No space left on device").

The storage that contains /var/lib/mysql is full. These is no space left on it for you to use. You will have to free up some space, move your database files to a different device or increase the size of the storage.

How you free up storage space depends upon what is filling it. How you increase the size (or whether you can) depends upon what kind of storage you have.

user9517
  • 115,471
  • 20
  • 215
  • 297
  • how can i free spaces or move that folder to another location? i have added df command output to my question – Omer Stimpack Dec 31 '16 at 19:39
  • Use `du -sh *` command in folders `/home` `/var` and `/var/lib` to check folders with not normal disk usage. You can find big files whitch are not used or need on your server. Also maybe they're many MySQL binary log files in folder `/var/lib/mysql`. In addition you can add new HDD drive to your server and move folder `/var/lib/mysql` to it. – Mikhail Khirgiy Jan 01 '17 at 06:50
  • Log cleanup? I think the default MariaDB install is as master so you'll have bin logs in `/var/log/mysql`. If you are not running a replication setup you can edit `/etc/mysql/my.cnf` comment out `log_bin = /var/log/mysql/mariadb-bin` and `log_bin_index = /var/log/mysql/mariadb-bin.index`. You may also need to set a shorter expiration time `expire_logs_days = 10`. You can also clear out old log files as long as they are not needed. Check `/var/log/nginx`, `/var/log/apache2` and the `/var/log` directories too. – Dave Lozier Jan 01 '17 at 17:32
  • The OP has pretty much everything on /. For all we know it could be a huge log file or similar in /var/log but why guess. It's easy enough to figure it out. The links I provided have plenty of information. – user9517 Jan 01 '17 at 17:43