LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   mysql will not restore database (https://www.linuxquestions.org/questions/linux-server-73/mysql-will-not-restore-database-864203/)

moodah 02-21-2011 09:20 PM

mysql will not restore database
 
Hi Guys.

I am having a problem restoring a database. Server is Ubuntu 8.04.4 LTS. It appears to wig out at a certain point, when this happens the output on the screen shows;


Quote:

0,4),('2011-02-21 03:30:32','Queue Wait Outside (100)','Queue Wait Outside (100)',11,0,4),('2011-02-21 03:30:49','Queue Wait Sleep (30)','Queue Wait Sleep (30)',5,0,4),('2011-02-21 03:30:53','Queue Wait Sleep (30)','Queue Wait Sleep (30)',13,0,4)
--------------

--------------
/*!40000 ALTER TABLE `exceptions` ENABLE KEYS */
--------------
The errors in the log shows;

Quote:

110222 13:27:52 [ERROR] /usr/sbin/mysqld: Disk is full writing '/var/run/mysqld/mysqld-bin.000001' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs
110222 13:37:52 [ERROR] /usr/sbin/mysqld: Disk is full writing '/var/run/mysqld/mysqld-bin.000001' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs
110222 13:47:52 [ERROR] /usr/sbin/mysqld: Disk is full writing '/var/run/mysqld/mysqld-bin.000001' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs
A df -h shows;

Quote:

root@prodsup01:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 19G 11G 7.1G 62% /
varrun 1014M 1014M 0 100% /var/run
varlock 1014M 0 1014M 0% /var/lock
udev 1014M 52K 1014M 1% /dev
devshm 1014M 0 1014M 0% /dev/shm
/dev/sdb1 30G 7.3G 21G 26% /var/lib/mysql

It looks like I am out of memory? Why is this happening?
The previous attempt at trying to do the restore hung at the same point, but I received emails from my Nagios monitoring server telling me that I was out of SWAP, not memory.
I have since given the server 3 gigs of swap to test and have now gotten the same error as before, but no alerts warning me that I am out of swap space.

I am using a virtual environment so I will try upping the ram to 4Gb to see if that makes any diff. It is currently set to 2Gb.

Anyone have any ideas?

corp769 02-21-2011 09:33 PM

Quote:

Originally Posted by moodah (Post 4266785)
Hi Guys.

I am having a problem restoring a database. Server is Ubuntu 8.04.4 LTS. It appears to wig out at a certain point, when this happens the output on the screen shows;




The errors in the log shows;



A df -h shows;




It looks like I am out of memory? Why is this happening?
The previous attempt at trying to do the restore hung at the same point, but I received emails from my Nagios monitoring server telling me that I was out of SWAP, not memory.
I have since given the server 3 gigs of swap to test and have now gotten the same error as before, but no alerts warning me that I am out of swap space.

I am using a virtual environment so I will try upping the ram to 4Gb to see if that makes any diff. It is currently set to 2Gb.

Anyone have any ideas?

In that case, try upping the disk space dedicated to your virtual environment.

moodah 02-22-2011 03:02 PM

It looks as if after creating more swap space (now 3Gb) and upping the ram (now 4gb), the database restore completed successfully.
The production database only contains 2Gb of RAM.
Mind you, it finished with;
Quote:

root@prodsup01:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 19G 9.9G 8.2G 55% /
varrun 2.0G 1.8G 183M 91% /var/run
91% of varrun being full.

I dont know how to explain this problem since our production database is fine, with only 2Gb of RAM, mind you, I don't think anyones ever needed to restore to that database.
This does not bode well for ease of mind.


Edit - I have assumed that one of the tables/objects/something in the database to be restored required more resources to load. Unless anyone can come up with anything better, haha.


All times are GMT -5. The time now is 08:40 PM.