500 Internal Server Error during mysqldump


#1

Hi,

I want to create a dump of my MySQL database and download it. I cannot do it via phpMyAdmin, because the database is too large and it generates an 500 Internal Server Error.

I tried to do that from shell, like this:

mysqldump -u mysqluser -p -h mysql.mydomsain.com mydb > dump.sql

The backup goes fine, but it runs for quite a long time and during that time my main site, phpBB forum, stops working! It always displays: 500 Internal Server Error when trying to view the forum. I don’t want to stop the whole forum just because I’m making a database dump.

Do you have any ideas?


#2

You may have to stop the forum for a dump. As I recall, databases are tricky to dump because they can’t gracefully pause all activity while the dump takes place.

Have you tried phpBB’s Backup Database option in the admin menu?

-Scott


#3

Couple things. Can you give an approximation of the size of your forum? Appropriate answers could be “wee”, “decent”, or “frickin huge!” Are you attempting to export the script as an archived file, such as zipped? Evidently zipped archives have to be completely assembled in server memory, and could exceed the amount permitted by a standard PHP installation. This seems unlikely to be the culprit based on your command shell example though.

When using the export functionality of phpMyAdmin, are you selecting the boxes marked “Enclose export in a transaction” and “Disable foreign key checks”? The first option can help to ensure minimal risk of corruption should things continue to fail, and the second option should speed the process up even if you run the risk of losing a minimal number of posts created at the exact time of your export.

Keep in mind that you’re ALWAYS going to risk losing a few posts if you’re unwilling to shut the forum down for maintenance during export. Wish I had something a little more concrete for you right now.

[quote]From:http://localhost/phpMyAdminRemote/Documentation.html#faq1_36

1.36 I get an error “500 Internal Server Error”.

There can be many explanations to this and a look at your server’s error log file might give a clue.[/quote]

[quote]From:http://localhost/phpMyAdminRemote/Documentation.html#faq3_2

3.2 When dumping a large table in compressed mode, I get a memory limit error or a time limit error.

Compressed dumps are built in memory and because of this are limited to php’s memory limit. For GZip/BZip2 exports this can be overcome since 2.5.4 using $cfg[‘CompressOnFly’] (enabled by default). Zip exports can not be handled this way, so if you need Zip files for larger dump, you have to use another way.[/quote]

[quote]From:http://localhost/phpMyAdminRemote/Documentation.html#faq1_1

1.1 I’m running PHP 4+ and my server is crashing each time a specific action is required or phpMyAdmin sends a blank page or a page full of cryptic characters to my browser, what can I do?

There are some known PHP bugs with output buffering and compression.
Try to set the $cfg[‘OBGzip’] directive to FALSE in your config.inc.php file and the zlib.output_compression directive to Off in your php configuration file.
Furthermore, we know about such problems connected to the release candidates of PHP 4.2.0 (tested with PHP 4.2.0 RC1 to RC4) together with MS Internet Explorer. Please upgrade to the release version PHP 4.2.0.[/quote]