Webforms module breaks MySQL database I've got 'Webform 7.x.3.20&quot; installed on my Drupal 7 and it works perfectly, apart from it seems to have 'broken' the MySQL database. I first noticed this when I tried to use the 'Backup and Migrate' module - I got the following error:
Additional uncaught exception thrown while handling exception.

Additional uncaught exception thrown while handling exception.
Original
PDOException: SQLSTATE[HY000]: General error: 2013 Lost connection to
MySQL server during query: show table status; Array ( ) in
backup_migrate_source_db_mysql-&gt;query() (line 435 of
/home/example.com/public_html/sites/all/modules/backup_migrate/includes/sources.db.mysql.inc).
Additional
PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has
gone away: INSERT INTO {watchdog} (uid, type, message, variables,
severity, link, location, referer, hostname, timestamp) VALUES
(:db_insert_placeholder_0, :db_insert_placeholder_1,
:db_insert_placeholder_2, :db_insert_placeholder_3,
:db_insert_placeholder_4, :db_insert_placeholder_5,
:db_insert_placeholder_6, :db_insert_placeholder_7,
:db_insert_placeholder_8, :db_insert_placeholder_9); Array (
[:db_insert_placeholder_0] =&gt; 1 [:db_insert_placeholder_1] =&gt;
php [:db_insert_placeholder_2] =&gt; %type: !message in %function
(line %line of %file). [:db_insert_placeholder_3] =&gt;
a:6:{s:5:&quot;%type&quot;;s:12:&quot;PDOException&quot;;s:8:&quot;!message&quot;;s:112:&quot;SQLSTATE[HY000]:
General error: 2013 Lost connection to MySQL server during query: show
table status; Array ( )
&quot;;s:9:&quot;%function&quot;;s:39:&quot;backup_migrate_source_db_mysql-&gt;query()&quot;;s:5:&quot;%file&quot;;s:96:&quot;/home/example.com/public_html/sites/all/modules/backup_migrate/includes/sources.db.mysql.inc&quot;;s:5:&quot;%line&quot;;i:435;s:14:&quot;severity_level&quot;;i:3;}
[:db_insert_placeholder_4] =&gt; 3 [:db_insert_placeholder_5] =&gt;
[:db_insert_placeholder_6] =&gt;
http://example.com/admin/config/system/backup_migrate
[:db_insert_placeholder_7] =&gt;
http://example.com/admin/config/system/backup_migrate
[:db_insert_placeholder_8] =&gt; 82.29.92.127
[:db_insert_placeholder_9] =&gt; 1409596675 ) in dblog_watchdog()
(line 160 of
/home/example.com/public_html/modules/dblog/dblog.module).
Uncaught exception thrown in session handler.
PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has
gone away: SELECT 1 AS expression FROM {sessions} sessions WHERE (
(sid = :db_condition_placeholder_0) AND (ssid =
:db_condition_placeholder_1) ); Array ( [:db_condition_placeholder_0]
=&gt; Zy8B5O3kHHKb5uIZnFFODRyXl9C_a82Ek-o9why5wNU [:db_condition_placeholder_1] =&gt; ) in _drupal_session_write() (line
209 of /home/example.com/public_html/includes/session.inc).

I then went to look on phpMyAdmin to find that if I clicked on the database itself, it showed that there were no tables and has started logging me out of phpMyAdmin almost immediately. However, if I click on the '+' to the left of database name on the left hand side, I can view all of the tables in the database and even browse them individually.
Finally, I have used mysqlcheck over SSH and found that all the tables are OK until it reaches any belonging to webforms, and then I get &quot;Got error: 2013...&quot; again. I know for definite it is the module because I tried removing the tables for the database, and everything goes back to normal.
Any ideas why this is happening and how this can be fixed? The webform module is excelllent and I do make good usage of it, however I'm going to have to find an alternative if this continues as I can't even update Drupal core or backup the database at the minute!
I would expect this is more related to the backup and migrate module.

The addition of the webform module's data may have pushed your setup over its limit when doing large amounts of processing like backup and migrate would be doing.

I would suggest checking your MySQL configuration's max_allowed_packet setting, it may be too low.

I would usually recommend setting it to 64M for Drupal 7 and then restarting the MySQL service and see if that resolves the issue.