PDA

View Full Version : mysqldump hanging only when started by mysql-zrm



kangcool
June 5th, 2009, 06:35 AM
This is on opensolaris
mysqldump 5.0.67
mysql-zrm 2.1.1

This seems to be an intermittent issue - as it only happens for cron jobs and large db.

I have tried running mysqldump with the same input of mysql-zrm and it works just fine - i have run it from a perl script and it worked fine.

So I am thinking it must have something to do with the env when its running in mysql-zrm.

From the logs there is nothing of note. The logs just stop when it stops download from the db.

On db site there are no errors.

So I am pretty stuck.

So any help would be great.

paddy
June 5th, 2009, 09:54 AM
1. Did you try running "mysqldump" as mysql user?
2. Did you try running "mysqldump" from crontab?

Paddy

kangcool
June 5th, 2009, 01:24 PM
1. Did you try running "mysqldump" as mysql user?


No - to clarify that this is user that you define in the mysql-zrm.conf?
If this is true, then i can't as that user does not exist on the box thats running mysql-zrm.

mysql-zrm run as root user, and that is what i have been using to test.



2. Did you try running "mysqldump" from crontab?
Paddy
No will try this on monday

For a db with the size of 66mb mysqldump keeps hanging on between 1st and 5th table.

I run mysqldump in root console with the details from mysql-zrm is produces the correct dump.

In same console I run mysql-zrm-schedule --now --backup-set XXXX and the mysqldump hangs

kangcool
June 8th, 2009, 01:00 AM
1. Did you try running "mysqldump" as mysql user?
2. Did you try running "mysqldump" from crontab?

Paddy

I have run mysqldump from crontab and it worked fine - copied the database as expected.

So something is broke in the env of mysql-zrm.

Really need some help on this as only a 1/4 of the databases were backed up.

kangcool
July 3rd, 2009, 01:21 AM
Right its broke again.

Really need some help paddy...

Again mysql-zrm-schedule is failing for the large dbs - mysqldump seems to just hang.

Running mysqldump on its own brings down the db just fine

paddy
July 4th, 2009, 02:14 PM
Any information in mysqld logs? Do you know if mysqldump is waiting for read lock?

What is the version of mysql server?

Paddy

kangcool
July 5th, 2009, 11:30 AM
Thanks for the reply.

Can't find anything in the logs.

Any idea how you can tell that mysqldump is waiting for read lock?

its mysql 5.0.20 and 5.0.27

kangcool
July 6th, 2009, 01:49 AM
Some more observations.

when trying to do a full copy of the database with mysqldump, mysqldump seems to just stop.

The file it is dumping to stops increasing in size, cpu usage goes to zero.

There are no errors produced from it on why it has stopped.

On the db side there are no errors in the logs - nothing in mysqld.log, mysql.error

processlist states that the query is still running, with the State of "Writing to net"

paddy
July 6th, 2009, 04:55 AM
This is probably related to mysqldump options used by ZRM. Set verbose=1 in mysql-zrm.conf, run a backup. You will find the mysqldump options used by ZRM.

Paddy

kangcool
July 6th, 2009, 06:34 AM
Thanks for the reply.

That was on of the first things I tried.

If I copy the mysqldump link from the mysql-zrm verbose and run it on the cli it works fine, every time.

I run mysql-zrm and it hangs on just about the same point.

I have now been going these errors:
mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `XXXXXX` at row: 31532

kangcool
July 16th, 2009, 01:19 AM
It seems like a driver issue.

Changed the driver being used, joy of vmware, and not had an issue for a week.

ittec
October 20th, 2011, 01:31 AM
Hello

I have exactly same problem. I have resolved issue in local MASTER MySQL, increasing value of MAX_ALLOWED_PACKET but, if I run backup from ZRM it hang every time

What can I modify values of mysqldump? Or How can I fix this?

ERROR:


mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `fotoexif` at row: 181077
mf_daily:backup:ERROR: mysqldump did not succeed.

STATUS

backup doing mysqldump local mode OK
backup trough ZRM FAILS

Any ideas guys?

Thanks

paddy
October 20th, 2011, 10:57 AM
You can use extra-mysqldump-options parameter in the mysql-zrm.conf

See http://wiki.zmanda.com/index.php/Mysql-zrm-backup

srivastava
February 8th, 2012, 12:25 AM
try to uninstall and install it again...