Recently my backups started failing with "Internal Server Error". I checked the Apache error logs as well as Drupal's logs and I'm not seeing any errors. I've tried all of the combinations of backup including Download, Manual Backups Directory, etc. but all fail.

Comments

JoeShmoe’s picture

Version: 7.x-3.x-dev » 7.x-2.7

Same here, getting 500 Server errors with no logs

ronan’s picture

Category: Bug report » Support request
Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)

That's not really enough info to go on in terms of trying to figure out the issue. Is there any way to get more info about this error? Can your web host help you figure out what the specific issue is?

akalata’s picture

I'm getting the same error, but only on one site, when trying to backup a large amount of files (using backup_migrate_files, 550MB), and only when trying to save it to Amazon S3. Likely a server issue, but the lack of logs (no fault of the module(s)!) is annoying.

Agree that asking webhost is next best step.

mustafa.ata’s picture

+1

lalbright’s picture

What kind of information do you need from us, as I too am having the same issue.

ronan’s picture

@lalbright I'd love to tell you. A white screen of death doesn't give me a ton if info and if there's nothing in your PHP log then there's not a lot for me to go on. The most common issue with this module is that very large db's or large file directories are likely to cause timeouts or memory errors. These are the most common issues because very often when they happen the php script simply stops running, giving my module no opportunity to recover or even warn the user what went wrong. If increasing your timeout or memory doesn't help then I'm not sure what else to try.

jkingsnorth’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

There has been no response for a while so I'm going to close off the issue. Please do reopen it against the latest version if this is still a problem.

kumar_kundan’s picture

It is a memory related issue. when you run backup check you RAM status it is using max of it and while trying to backup database aand all the things. Increase your RAM and PHP configuration. This issue will be resolved.

francewhoa’s picture

We were able to reproduce this error. This is to confirm this challenge is likely to be with Apache though. Not with Backup and Migrate Drupal module. Steps to reproduce and potential resolutions below.


Steps to reproduce

  1. Install a fresh backup_migrate 7.x-2.7 or 7.x-3.1
  2. Somehow create a Drupal database larger than 50MB. Without compression. One option to create that database is to use Drush with Devel sub-module devel_generate.
  3. Using Drupal go to /admin/config/system/backup_migrate/settings/profile
    1. Set the compression to "BZip". If not available try "GZip". It's easier to reproduce with BZip though.
  4. Go to /admin/config/system/backup_migrate/admin/
    1. Set the appropriate profile to any with "BZip" compression. Click on "Quick Backup" button.
    2. After a while this error is return
      1. Internal Server Error
        The server encountered an internal error or misconfiguration and was unable to complete your request.
        Please contact the server administrator, <MASKED> and inform them of the time the error occurred, and anything you might have done that may have caused the error.
        More information about this error may be available in the server error log.

  5. This error depend on the amount of resource available on your server. So it's hard to reproduce. If you can't reproduce, simply increase the size of the Drupal database from 50MB to 150MB. Then repeat the same steps as above. And so on. Until the error can be reproduce.


Resolution

We faced the same challenge at Ubertus. For easy future reference, here are three options to resolve this. Choose one:

  1. Configure Apache RLimit
    • Note: Configure appropriately Apache RLimit is a permanent fix. Your need root access though. Thanks to Nightwalker3000 for this option :)
  2. Set "No Compression"
    • Note: Set your backup to "No Compression" is a temporary workaround. After a while when your database gets bigger this option might not work. This option might be handy if you do not have root access to the Apache settings.
  3. Set "GZip"
    • Notes
      • Set the compression to GZip instead of BZip. For those not familiar with those compression settings, they can be edited at /admin/config/system/backup_migrate/settings/profile
      • The following are the compression formats sorted top down by amount of server resources used:
        1. BZip
        2. GZip
        3. No Compression

Thanks to Jenn for the last two options above :)


I suggest to set this ticket to "Closed (works as designed)". Because we were able to reproduce this error. But it's likely cause by Apache configuration. Not by Backup and Migrate Drupal module.

msajn’s picture

If everything fails....just try to backup files on your server and database, and install fresh updated core... You have nothing to lose. Works for me always and it's faster than debugging. But leave your important folders like modules, libraries, themes etc. intact...Just install new core like you would perform core update...

no sssweat’s picture

I ran into this issue in a development server not set up by me.

The odd solution that I found by chance is:

Disable or enable any module, now backup works and downloads.

It only works 1 time, if you want to download again you'll have to enable or disable any module again.

benjarlett’s picture

I just had to clear the cache.

dariemlazaro’s picture

Migrating a site with a 3.5 GB database I found the same problem, the browser returned error 500 in the POST console, but the page was blank. I managed to solve the problem as follows:
1- Set memory_limit = 1280M
2- Set post_max_size = 10000M
and upload_max_filesize = 10000M

3- Restart Apache.

And so it allows to export the Database. Less than equal may work, depending on the size of each database.

Tyheman’s picture

As #13 mentions, it appears some PHP settings were causing this error for me. I was able to fix this by adding this exact code in my .htaccess file located at the root of my Drupal folder. As mentioned, restart apache and try to download the sql file again. Hopefully that clears up the previous comment!

php_value upload_max_filesize 10000M
php_value post_max_size 10000M
php_value memory_limit 1280M