212

I am working on a project where i need to create a database with 300 tables for each user who wants to see the demo application. it was working fine but today when i was testing with a new user to see a demo it showed me this error message

1030 Got error 28 from storage engine

After spending some time googling i found it is an error that is related to space of database or temporary files. I tried to fix it but i failed. now i am not even able to start mysql. How can i fix this and i would also like to increase the size to maximum so that i won't face the same issue again and again.

ScoRpion
  • 11,364
  • 24
  • 66
  • 89
  • 1
    Stating the obvious... do you have enough free space on the partition where mysql data is stored? What platform are you running on? Localhost or a hosting company? – DCoder May 17 '12 at 07:14
  • @DCoder :- I have a server on Amazon cloud – ScoRpion May 17 '12 at 07:45
  • 1
    @ShowketBhat I have same issue, my `/tmp` folder is have 100% use of space. It is okay to just delete all files from this /tmp folder? And another question, why it doesn't deletes automatically? – Dima Deplov Sep 18 '13 at 20:02

11 Answers11

420

Mysql error "28 from storage engine" - means "not enough disk space".

To show disc space use command below.

myServer# df -h

Results must be like this.

Filesystem    Size    Used   Avail Capacity  Mounted on
/dev/vdisk     13G     13G     46M   100%    /
devfs         1.0k    1.0k      0B   100%    /dev
Konrad Viltersten
  • 36,151
  • 76
  • 250
  • 438
Oleksandr Diudiun
  • 4,354
  • 1
  • 15
  • 7
  • 7
    For additional information, You will get same error if /tmp filesystem reach 100% of usage. – Kumar Feb 26 '15 at 05:32
  • 1
    Even if you have your Mysql data_dir in a different partition (or disk) which do have free space, you must have free space on / and /tmp (of course you could have last ones on a different partition/disk) – Diego Andrés Díaz Espinoza Mar 31 '15 at 15:35
  • 1
    You saved my day, I've found 390 Gb file of slow log (( – mulya Apr 12 '16 at 10:26
34

To expand on this (even though it is an older question); It is not not about the MySQL space itself probably, but about space in general, assuming for tmp files or something like that. My mysql data dir was not full, the / (root) partition was

Maarten
  • 4,643
  • 7
  • 37
  • 51
11

I had the same issue in AWS RDS. It was due to the Freeable Space (Hard Drive Storage Space) was Full. You need to increase your space, or remove some data.

Gregory Burns
  • 820
  • 11
  • 23
9

My /tmp was %100. After removing all files and restarting mysql everything worked fine.

Sami Onur Zaim
  • 502
  • 6
  • 6
2

My /var/log/apache2 folder was 35g and some logs in /var/log totaled to be the other 5g of my 40g hard drive. I cleared out all the *.gz logs and after making sure the other logs werent going to do bad things if I messed with them, i just cleared them too.

echo "clear" > access.log

etc.

ZeMoon
  • 20,054
  • 5
  • 57
  • 98
2

Check your /backup to see if you can delete an older not needed backup.

Jacob
  • 21
  • 1
1

I had a similar issue, because of my replication binary logs.

If this is the case, just create a cronjob to run this query every day:

PURGE BINARY LOGS BEFORE DATE_SUB( NOW(), INTERVAL 2 DAY );

This will remove all binary logs older than 2 days.

I found this solution here.

GabrielOliv
  • 23
  • 1
  • 5
0

A simple: $sth->finish(); Would probably save you from worrying about this. Mysql uses the system's tmp space instead of it's own space.

Craig
  • 11
  • 2
0
sudo su


cd /var/log/mysql

and lastly type: > mysql-slow.log

This worked for me

Kaushik Thanki
  • 3,334
  • 3
  • 23
  • 50
0

Drop the problem database, then reboot mysql service (sudo service mysql restart, for example).

Sergio Belevskij
  • 2,478
  • 25
  • 24
0

If you want to use the tokudb plugin This can happen if you have less than 5% (by default) of free space.

see the option: tokudb_fs_reserve_percent

zersh
  • 136
  • 5