| Author |
Message |
midodds
knows MySQLDumper

Joined: 10 Apr 2011
Posts: 3

|
Posted:
2011-07-31, 20:55 Couldn't execute "SELECT * FROM `table` LIMIT 10000,10000 |
  |
Hi
Love the product and find it really useful. I have just intsalled on a new host and have the following problem
When running the php backup script all works ok
I get the following error when I try and run the perl backup script
................................................
9831 inserted records (size of backupfile: 205.15 MB)
Dumping table `tahola_support_email_body` (Type MyISAM):
Perl Cronscript ERROR: Couldn't execute "SELECT * FROM `table__body` LIMIT 10000,10000;" - MySQL-Error: Lost connection to MySQL server during query
Stopping script because of this fatal error!
Any ideas ?
Rgds,
Mike
|
|
  |
 |
Anzeigen
|
Posted:
Anzeigen |
 |
|
| |
 |
DSB
Developer


Age: 41
Joined: 30 Apr 2004
Posts: 16067
Location: Reichenberg bei Würzburg

|
Posted:
2011-07-31, 22:06 (No subject) |
  |
Hi Mike,
in the Perl mode MySQLDumper tries to read 10,000 records in one go. This is no problem normally and makes the backup via Perl much faster than using PHP.
But reading your error message, it looks like your new MySQL server doesn't like to fetch this number of records and is running into memory problems.
You can try to lower the number of records read at once by editing the file inc/runtime.php and changing line 70 from
Quote: $config['perlspeed']=10000; //Anzahl der Datensaetze, die in einem Rutsch gelesen werden
to
Quote: $config['perlspeed']=1000; //Anzahl der Datensaetze, die in einem Rutsch gelesen werden
"Anzahl der Datensaetze, die in einem Rutsch gelesen werden" is German and means: "number of records that are read at once".
After you've changed that and uploaded the file to your online MSD-Installation, you need to save your configuration in the gui of MSD (simply go to the configuration and hit the save button). This will write the new value to the used configuration file. Try the Perl backup again after you have done that.
The price you'll have to pay, is that the backup now is a little bit slower. For fetching 10,000 records MSD now needs to send 10 queries instead of one. But this way less memory is used and chances are high that this will now be successfull on your new server. If this is working you may want to set the value higher and try again. As long as you won't get the "Lost connection" error everything is ok.
_________________ Gruß / Greetings, DSB
Teigwaren heißen Teigwaren, weil sie Teig waren.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.
|
|
    |
 |
midodds
knows MySQLDumper

Joined: 10 Apr 2011
Posts: 3

|
Posted:
2011-07-31, 23:13 Couldn't execute "SELECT * FROM `table` LIMIT 10000,10000 |
  |
Brilliant !
This worked and the the backup has completed successfully I can now schedule in cron but.....
I have got the following message displayed
Finished backup of database `mydb__system`.
Starting autodelete function:
Keep the latest 3 backup files for each database and delete older ones.
Software error:
Undefined subroutine &main::gzopen called at crondump.pl line 1090.
For help, please send mail to the webmaster webmaster@midodds.email
for info my perl installation from my host does not support compressed files - following is displayed when I test perl modules but Gzip compression is switched off in General settings for my configuration
Output from test perl modules ....
"testing Compress::Zlib (needed for dumping data into a crompessed *.gz-file)...
Error: modul Compress::Zlib not found! crondump.pl can't write compressed files. Falling back to uncrompressed files (files are 10 times bigger)."
|
|
  |
 |
DSB
Developer


Age: 41
Joined: 30 Apr 2004
Posts: 16067
Location: Reichenberg bei Würzburg

|
Posted:
2011-07-31, 23:27 Re: Couldn't execute "SELECT * FROM `table` LIMIT 10000,10000 |
  |
« midodds » wrote: for info my perl installation from my host does not support compressed files
But you uploaded or created some *.gz files. If your Perl installation is not able to handle gz-files you need to take care that there are none.
If MySQLDumper discovers any *.gz-file it tries to open it to read the file's header. It tries so to execute the auto-delete function, because it needs to detect if this file is part of a multipart backup. And it needs to do so, because it wants to treat many files as one backup, if they are all part of the same backup.
Of course this will fail if your Perl installation is not able to open gz-compressed files.
Try to install compress::zlib (this is a standard Perl library which should be available) or make sure you haven't got a gz-compressed file in the folder work/backup.
This can be confusing if PHP is able to create gzipped files which Perl can't read. Neverthelesse you should contact your host if you are not able to install compress::zlib for Perl. This Perl module is such a basic thing which should be available on nearly any server.
If your server doesn't know how to handle gzipped files but there are some, we can't help it.
_________________ Gruß / Greetings, DSB
Teigwaren heißen Teigwaren, weil sie Teig waren.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.
|
|
    |
 |
midodds
knows MySQLDumper

Joined: 10 Apr 2011
Posts: 3

|
Posted:
2011-08-01, 00:31 Couldn't execute "SELECT * FROM `table` LIMIT 10000,10000 |
  |
Thanks for such quick responses
OK that makes sense
I was able to run the backup process using the PHP selection but not Perl so have created a few zipped backups.
As I have zipped files in the backup folder, from previous PHP backups, it appears the problem is the perl script is " falling over" when it reads the zipped files.
Now the perl cronscript is running successfully - based on chanes made earlier as per your recommendation I will schedule perl backup in cron and manually delete / move the zipped files out of the backup folder
Thanks again for your help ... I think it would be v useful to start a separate conversation / thread on using just php as I think this would be a very useful addition . BUT I'll create this separately
Mike
|
|
  |
 |
|
|
CrackerTracker © 2004 - 2012 CBACK.de
Powered by Orion based on phpBB
© 2001, 2002 phpBB Group
CBACK Orion Style based on FI Theme
All times are GMT + 2 Hours
phpBB SEO
|