HTTP error 500 when backup entire site Using Backup and Migrate module on a D7 site


separate backups (data / files) give no problem (backup to nodesquirrel AND download)
but backup entire site (data + files) generates "http error 500" (without "internal server error")


Error reporting


I have no access to Apache error log
Cpanel error: no error messages
Drupal error log: no error messages


Shared hosting | db 10.1.21-MariaDB | php 5.6.30 | drupal 7.53 | backup and migrate 7.x-3.1 | civicrm 7.x-4.7.14

[update]

The web host provider received next message:

 Uncaught exception 'PDOException'
 with message 'SQLSTATE[HY000]:
 General error: 2006 MySQL server has gone away'
 in &lt;drupal root&gt;/includes/database/database.inc:2227
 Stack trace:
 #0 /includes/database/database.inc(2227): PDOStatement-&gt;execute(Array)
 #1 /includes/database/database.inc(697): DatabaseStatementBase-&gt;execute(Array,  Array)
 #2 /includes/database/database.inc(2406): DatabaseConnection-&gt;query('SELECT expire, ...', Array, Array)
 #3 /includes/lock.inc(167): db_query('SELECT expire, ...', Array)
 #4 /includes/lock.inc(146): lock_may_be_available('schema:runtime:...')
 #5 /includes/bootstrap.inc(433): lock_acquire('schema:runtime:...')
 #6 /includes/bootstrap.inc(455): DrupalCacheArray-&gt;set(Array)
 #7 [internal function]: DrupalCacheArray-&gt;__destruct()
 #8 {main} in &lt;drupal root&gt;/includes/database/database.inc on line 2227
This is your error:

General error: 2006 MySQL server has gone away


You can try to fix this in two ways:


my.ini


Open your my.ini file and locate max_allowed_packet. By default this is 1M. Setting it to 16M and restart your MySQL server. If the problem persists, try setting it to 512M and restart your MySQL server.


MySQL prompt


Enter your MySQL prompt, log in as user root or as a user with the SUPER privilege. Run the following command:

SET GLOBAL max_allowed_packet = 1024 * 1024 * 512;


This method doesn't require you to restart the server.