Question

MySQL error: The partition with /var/lib/mysql is too full! ... failed!

  • Posted on August 26, 2014
  • mehdadAsked by mehdad

Hi all.

I am running in a problem here I have a VPS running on Debian 7.0 for a PrestaShop. All was working fine till last night. Today morning it showed me some error stating that there was no disk space to write of mysql.

So I tried to stop and start mysql server. Stopping worked fine, but when i start with following command

sudo /etc/init.d/mysql start or service mysql restart

It is showing me the error

root@hostname:/var/lib/mysql# /etc/init.d/mysql restart
Stopping MySQL database server: mysqld.
/etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full! ... failed!

ERROR: The partition with /var/lib/mysql is too full! … failed!

I have also deleted the binary log files directly from /var/log/apache2/error.log: 15G

When i delete the /var/log/apache2/error.log Restart the VPS Make a: “service mysql restart”

All will be working okay again, but after some time (12-24 hr) i get this error on my front page on the shop, then i start all over again.

Link to database cannot be established: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

VPS info: Kernel: debain 7.0 x64 vmlinuz-3.2.0-4amd64 (3.2.54-2) VPS: 1GB Ram 20GB SSD Disk Amsterdam 2 System: Prestashop 1.6.0.9

Space: root@hostname:/var/lib/mysql# df -h Filesystem Size Used Avail Use% Mounted on rootfs 20G 19G 0 100% / udev 10M 0 10M 0% /dev tmpfs 101M 128K 101M 1% /run /dev/disk/by-label/DOROOT 20G 19G 0 100% / tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 201M 0 201M 0% /run/shm

Big file status: /var/cache/apt-xapian-index/index.1/termlist.DB: 32M /var/cache/apt-xapian-index/index.1/postlist.DB: 39M /var/cache/apt/pkgcache.bin: 21M /var/cache/apt/srcpkgcache.bin: 21M /var/lib/apt/lists/mirrors.digitalocean.com_debian_dists_wheezy_main_binary-amd64_Packages: 28M /var/lib/mysql/ibdata1: 106M PS.16_20140826-032405-23a564e4.zip: 403M PS.16_20140826-035510-5cb11788.zip: 42M PS.16_20140826-035410-73745747.zip: 42M PS.16_20140826-035309-4efbed78.zip: 104M PS.16_20140826-033803-65d04df1.zip: 396M PS.16_20140826-035209-7bf5e4d6.zip: 47M PS.16_20140826-033604-2b4f62c0.zip: 376M PS.16_20140826-034207-3fded2c4.zip: 393M PS.16_20140826-032510-2c0a6f8d.zip: 438M PS.16_20140826-035809-9cbc4cc.zip: 74M PS.16_20140826-033711-52fb7dd7.zip: 46M PS.16_20140826-035909-354b837e.zip: 46M /var/www/BackUpS4Yv2.2.zip: 202M /var/log/apache2/error.log: 15G /proc/kcore: 128T

Prestashop system status: Server information Linux #1 SMP Debian 3.2.54-2 x86_64 Server software version Apache/2.2.22 (Debian) PHP version 5.4.4-14+deb7u11 Memory limit 512M Max execution time 1000 MySQL version 5.5.37-0+wheezy1 MySQL engine InnoDB

Thanks

Meg

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

This is due disk too full that can restrain mysql service to start. Run in terminal:

df -h /dev/sda1

You´ll probaly see your disk at 100% of usage. Try to free some space and also, try to run:

apt-get clean

This should free some space to allow mysql start normally. Just restart mysql service:

service mysql restart

Then you good to go!

Hello,

Have a look at this post on server fault:

http://serverfault.com/questions/588233/php-is-not-executing-scripts-after-debian-upgrade

The user who posted the question answered it themselves and seems to claim that it is a problem with one of the apache modules. It’s also using the same version of apache with PHP

What apache modules are you using? Maybe try disabling them all and enable them one by one using a2enmod?

List modules

apachectl -M

Disable mod one by one

a2dismod modname

Enable them one by one

a2enmod modname

Just a shot in the dark.

Good luck!

My /var/log/apache2/error.log file is empty now again.

[Tue Aug 26 19:56:44 2014] [notice] Apache/2.2.22 (Debian) PHP/5.4.4-14+deb7u11 configured -- resuming normal operations
[Tue Aug 26 20:17:01 2014] [notice] caught SIGTERM, shutting down
[Tue Aug 26 20:17:33 2014] [notice] Apache/2.2.22 (Debian) PHP/5.4.4-14+deb7u14 configured -- resuming normal operations
[Tue Aug 26 20:17:34 2014] [notice] Graceful restart requested, doing restart
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Tue Aug 26 20:17:34 2014] [notice] Apache/2.2.22 (Debian) PHP/5.4.4-14+deb7u14 configured -- resuming normal operations
[Tue Aug 26 20:17:41 2014] [notice] Graceful restart requested, doing restart
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Tue Aug 26 20:17:41 2014] [notice] Apache/2.2.22 (Debian) PHP/5.4.4-14+deb7u14 configured -- resuming normal operations

But i will give it a few minutes to do some more log.