3

I had some mysql problems yesterday. I got "Too many connections" error on my sites because one of my script went a little bit crazy. After I fixed the connection problems I still got an error in mysql log.

/usr/sbin/mysqld: Disk is full writing

I checked my disk usage with "df -h" and I got this result:

Filesystem Size Used Avail Use% Mounted on

/dev/xvda1 3.0G 2.9G 0 100% /

none 530M 132K 530M 1% /dev

none 549M 0 549M 0% /dev/shm

none 549M 52K 549M 1% /var/run

none 549M 0 549M 0% /var/lock

So my "/dev/xvda1" file is full. I have no idea what this file doing, im really beginner on linux systems. My question is what should I do with it? Delete it?

martintrapp
  • 177
  • 1
  • 1
  • 5

1 Answers1

1

If you delete that "file" you will be erasing your disk. /dev/xda1 is the the logical path that refers to your hard drive.

First of all check /var/log to see how big it is (go to the folder and do du -sh). Erase (extract first to another machine if you need them later) the logs of mysql if they are too big. My guess is your "crazy script" filled up your logs.

Lucas Kauffman
  • 16,880
  • 9
  • 58
  • 93
  • Thank you for your fast answer Lucas, /var/log uses 971M I checked the biggest files in it. rewrite.log - 144M rewrite.log.1 - 641M Should I erase them? – martintrapp Dec 07 '12 at 08:00
  • if there isn't anything in them you need, you can null them – Lucas Kauffman Dec 07 '12 at 08:32
  • Awesome thanks! It seems everything is working fine now. Have a nice day! – martintrapp Dec 07 '12 at 08:47
  • Running a vm with 3GB diskspace is risky if you don't have proper logrotation rules in place. I would suggest that you read up on log rotation and keep log files for no more than 7 days, depending on your requirements. – Danie Dec 07 '12 at 08:49