Title: SQL MailPoet Error
Last modified: January 15, 2021

---

# SQL MailPoet Error

 *  Resolved [k20shores](https://wordpress.org/support/users/k20shores/)
 * (@k20shores)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/sql-mailpoet-error/)
 * Hello,
 * This error message is repeated in my logs. Is there something that I can do about
   this?
 *     ```
       [15-Jan-2021 00:58:30 UTC] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in /home/my_user/public_html/wp-content/plugins/mailpoet/lib/Doctrine/Driver/PDOConnection.php:81
       Stack trace:
       #0 /home/my_user/public_html/wp-content/plugins/mailpoet/lib/Doctrine/Driver/PDOConnection.php(81): PDO->query('SELECT t0.name ...')
       #1 /home/my_user/public_html/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(2): MailPoet\Doctrine\Driver\PDOConnection->query('SELECT t0.name ...')
       #2 /home/my_user/public_html/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(2): MailPoetVendor\Doctrine\DBAL\Connection->executeQuery('SELECT t0.name ...', Array, Array)
       #3 /home/my_user/public_html/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php(2): MailPoetVendor\Doctrine\ORM\Persisters\Entity\BasicEntityPersister->loadAll(Array, NULL, NULL, NULL)
       #4 /hom in /home/my_user/public_html/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 2
       ```
   
    -  This topic was modified 5 years, 4 months ago by [k20shores](https://wordpress.org/support/users/k20shores/).
    -  This topic was modified 5 years, 4 months ago by [k20shores](https://wordpress.org/support/users/k20shores/).

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [k20shores](https://wordpress.org/support/users/k20shores/)
 * (@k20shores)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/sql-mailpoet-error/#post-13910254)
 * Alright, this error just caused my site to crash. Disabling MailPoet and MailPoet
   only fixed the site. Tangentially, a backup of my site was being done by UpDraft.
   I do not know if that is related.
 *  [ashleyhorsley](https://wordpress.org/support/users/ashleyhorsley/)
 * (@ashleyhorsley)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/sql-mailpoet-error/#post-13912395)
 * I’ve had exactly the same happen to me. I have managed to get the site working
   again but often get 503 errors and when checking the site is using high CPU levels
   and large amounts of memory
    Any ideas on how to fix?
 *  Thread Starter [k20shores](https://wordpress.org/support/users/k20shores/)
 * (@k20shores)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/sql-mailpoet-error/#post-13912469)
 * [@ashleyhorsley](https://wordpress.org/support/users/ashleyhorsley/) I had also
   disabled proxy access like this ([https://perishablepress.com/wordpress-block-proxy-visits/](https://perishablepress.com/wordpress-block-proxy-visits/))
   because I thought it would be good. It was not. So, at the same time my site 
   was being backed up (high CPU and memory usage), MailPoet was producing that 
   error and also reporting that it could not access the scheduler.
 * What I did was to disable MailPoet and UpdraftPlus and kill all of the processes
   that were running rampant. The easiest way to identify and kill those processes
   is to `ssh` into your server, run `top`, and then, from within `top`, killing
   the offending processes. Once the CPU usage was in check, I re-enabled MailPoet
   and then found out that MailPoet was having scheduling issues. I removed the 
   proxy stuff and it can now connect to the scheduler.
 * Now, all of this seems different than the error shown above. It certainly is 
   an uncaught exception that MailPoet should handle. However, because my site was
   doing more than one thing, I suppose I can’t definitely say that MailPoet alone
   crashed my site. My advice is to monitor your CPU usage over `ssh` and try to
   correlate what’s going on with each plugin, which is kinda hard to do.
 *  Thread Starter [k20shores](https://wordpress.org/support/users/k20shores/)
 * (@k20shores)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/sql-mailpoet-error/#post-13916294)
 * Alright, this error appeared again this morning. It is a fact that at the time
   of the error the site was not undergoing a backup. I do not think that this error
   has any dependence on Updraft. That is, this is a standalone error within MailPoet
   that needs to be fixed.
 * It is possible that there is some configuration set incorrectly, but I do not
   know enough about how MailPoet works (and I’m not going to dig through your files
   because they are mostly minified) to come up with a solution myself. I will gladly
   provide any information necessary to help reach a resolution.
 *  [GDM57](https://wordpress.org/support/users/gdm57/)
 * (@gdm57)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/sql-mailpoet-error/#post-13924100)
 * For months, several sites that I manage and that have MailPoet (free and pro)
   have been sending malfunction messages with the same values reported in this 
   forum:
 * An E_ERROR error was caused in line 2 of the file /home/mydomain.it/wp-content/
   plugins/mailpoet/vendor-prefixed/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.
   php. Messaggio di errore: Uncaught PDOException: SQLSTATE[HY000]: General error:
   2006 MySQL server has gone away in /home/mydomain.it/wp-content/plugins/mailpoet/
   lib/Doctrine/Driver/PDOConnection.php:85
    Stack trace: #0 /home/mydomain.it/wp-
   content/plugins/mailpoet/lib/Doctrine/Driver/PDOConnection.php(85): PDO->query(‘
   SELECT t0.name …’) #1 /home/mydomain.it/wp-content/plugins/mailpoet/vendor-prefixed/
   doctrine/dbal/lib/Doctrine/DBAL/Connection.php(2): MailPoet\Doctrine\Driver\PDOConnection-
   >query(‘SELECT t0.name …’) #2 /home/mydomain.it/wp-content/plugins/mailpoet/vendor-
   prefixed/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.
   php(2): MailPoetVendor\Doctrine\DBAL\Connection->executeQuery(‘SELECT t0.name…’,
   Array, Array) #3 /home/mydomain.it/wp-content/plugins/mailpoet/vendor-prefixed/
   doctrine/orm/lib/Doctrine/ORM/EntityRepository.php(2): MailPoet
 * By accessing the sites, everything looks ok.
    In the meantime, I have made numerous
   updates in recent months, but nothing changes, the error report keeps coming 
   from time to time.
 * Finally, today MailPoet on a site with woocommerce, prevents woocommerce from
   sending emails for new orders received that were sent directly from the site 
   and not with MailPoet.
    There is to cry …
 *  [Wysija](https://wordpress.org/support/users/wysija/)
 * (@wysija)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/sql-mailpoet-error/#post-13991009)
 * Hey there,
 * > Uncaught PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has
   > gone away
 * Please refer to this article on how to fix this error on your WordPress website:
   
   [How to Fix General Error: 2006 MySQL Server has Gone Away](https://kb.mailpoet.com/article/307-how-to-fix-general-error-2006-mysql-server-has-gone-away)
 * Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘SQL MailPoet Error’ is closed to new replies.

 * ![](https://ps.w.org/mailpoet/assets/icon-256x256.png?rev=3284564)
 * [MailPoet - Newsletters, Email Marketing, and Automation](https://wordpress.org/plugins/mailpoet/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailpoet/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailpoet/)
 * [Active Topics](https://wordpress.org/support/plugin/mailpoet/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailpoet/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailpoet/reviews/)

## Tags

 * [sql](https://wordpress.org/support/topic-tag/sql/)

 * 6 replies
 * 4 participants
 * Last reply from: [Wysija](https://wordpress.org/support/users/wysija/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/sql-mailpoet-error/#post-13991009)
 * Status: resolved