Title: WordPress database error Deadlock
Last modified: April 19, 2024

---

# WordPress database error Deadlock

 *  Resolved [Joe](https://wordpress.org/support/users/joewa1980/)
 * (@joewa1980)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-deadlock-7/)
 * We get this series of database deadlock errors every couple of days. Referencing
   WP Mail SMTP. Any ideas? Thanks!
 *     ```wp-block-code
       [18-Apr-2024 14:54:56 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query INSERT INTO vo_actionscheduler_actions ( hook, status, scheduled_date_gmt, scheduled_date_local, schedule, group_id, priority, args ) SELECT 'wp_mail_smtp_queue_process', 'pending', '2024-04-18 14:54:56', '2024-04-18 15:54:56', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1713452096;s:18:\"\0*\0first_timestamp\";i:1713452096;s:13:\"\0*\0recurrence\";i:60;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1713452096;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:60;}', 2, 10, '[null]' FROM DUAL WHERE ( SELECT action_id FROM vo_actionscheduler_actions WHERE status IN ( 'pending', 'in-progress' ) AND hook = 'wp_mail_smtp_queue_process' AND group_id = 2 LIMIT 1 ) IS NULL made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, WPMailSMTP\Core->get_tasks, WPMailSMTP\Tasks\Tasks->init, WPMailSMTP\Tasks\Queue\ProcessQueueTask->init, WPMailSMTP\Tasks\Task->register, WPMailSMTP\Tasks\Task->register_recurring, as_schedule_recurring_action, ActionScheduler_ActionFactory->create, ActionScheduler_ActionFactory->store_unique_action, ActionScheduler_DBStore->save_unique_action, ActionScheduler_DBStore->save_action_to_db 
   
       [18-Apr-2024 14:54:56 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query INSERT INTO vo_actionscheduler_actions ( hook, status, scheduled_date_gmt, scheduled_date_local, schedule, group_id, priority, args ) SELECT 'wp_mail_smtp_queue_process', 'pending', '2024-04-18 14:54:56', '2024-04-18 15:54:56', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1713452096;s:18:\"\0*\0first_timestamp\";i:1713452096;s:13:\"\0*\0recurrence\";i:60;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1713452096;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:60;}', 2, 10, '[null]' FROM DUAL WHERE ( SELECT action_id FROM vo_actionscheduler_actions WHERE status IN ( 'pending', 'in-progress' ) AND hook = 'wp_mail_smtp_queue_process' AND group_id = 2 LIMIT 1 ) IS NULL made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, WPMailSMTP\Core->get_tasks, WPMailSMTP\Tasks\Tasks->init, WPMailSMTP\Tasks\Queue\ProcessQueueTask->init, WPMailSMTP\Tasks\Task->register, WPMailSMTP\Tasks\Task->register_recurring, as_schedule_recurring_action, ActionScheduler_ActionFactory->create, ActionScheduler_ActionFactory->store_unique_action, ActionScheduler_DBStore->save_unique_action, ActionScheduler_DBStore->save_action_to_db 
   
       [18-Apr-2024 15:20:14 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query INSERT INTO vo_actionscheduler_actions ( hook, status, scheduled_date_gmt, scheduled_date_local, schedule, group_id, priority, args ) SELECT 'wp_mail_smtp_queue_process', 'pending', '2024-04-18 15:20:14', '2024-04-18 16:20:14', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1713453614;s:18:\"\0*\0first_timestamp\";i:1713453614;s:13:\"\0*\0recurrence\";i:60;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1713453614;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:60;}', 2, 10, '[null]' FROM DUAL WHERE ( SELECT action_id FROM vo_actionscheduler_actions WHERE status IN ( 'pending', 'in-progress' ) AND hook = 'wp_mail_smtp_queue_process' AND group_id = 2 LIMIT 1 ) IS NULL made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, WPMailSMTP\Core->get_tasks, WPMailSMTP\Tasks\Tasks->init, WPMailSMTP\Tasks\Queue\ProcessQueueTask->init, WPMailSMTP\Tasks\Task->register, WPMailSMTP\Tasks\Task->register_recurring, as_schedule_recurring_action, ActionScheduler_ActionFactory->create, ActionScheduler_ActionFactory->store_unique_action, ActionScheduler_DBStore->save_unique_action, ActionScheduler_DBStore->save_action_to_db
       ```
   

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

 *  [Nukak Asanansi](https://wordpress.org/support/users/nasanansi/)
 * (@nasanansi)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-deadlock-7/#post-17708735)
 * Hi [@joewa1980](https://wordpress.org/support/users/joewa1980/),
 * Thanks for reaching out, and I apologize for the inconvenience.
 * These deadlock errors usually occur when there are lots of pending cron tasks
   from a particular plugin (usually your caching plugin) causing interference with
   a function in the WP Mail SMTP plugin.
 * Please try deactivating your caching plugin. Then remove all pending cron tasks
   on your site related to it. Then re-activate the plugin, and this should resolve
   the issue.
 * I hope this helps. Thanks 🙂
 *  Thread Starter [Joe](https://wordpress.org/support/users/joewa1980/)
 * (@joewa1980)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-deadlock-7/#post-17708745)
 * Thanks [@nasanansi](https://wordpress.org/support/users/nasanansi/) – I saw this
   suggestion elsewhere yesterday so waiting a couple of days to see if we experience
   the deadlocks again.
 *  [Nukak Asanansi](https://wordpress.org/support/users/nasanansi/)
 * (@nasanansi)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-deadlock-7/#post-17711255)
 * Hi [@joewa1980](https://wordpress.org/support/users/joewa1980/),
 * Thanks for letting us know.
 * I’ll be closing this thread for now. If you still run into any issues, please
   feel free to reply and we’ll take a look. 🙂
 * Have a good one 🙂
 *  Thread Starter [Joe](https://wordpress.org/support/users/joewa1980/)
 * (@joewa1980)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-deadlock-7/#post-17711439)
 * Thanks [@nasanansi](https://wordpress.org/support/users/nasanansi/) – I’m happy
   with that, we’ve not seen the issue occur in the past 6 days, so it’s looking
   good.
 *  Thread Starter [Joe](https://wordpress.org/support/users/joewa1980/)
 * (@joewa1980)
 * [2 years ago](https://wordpress.org/support/topic/wordpress-database-error-deadlock-7/#post-17720034)
 * It happened today, 11 days after the previous occurrence though.
 *     ```wp-block-code
       [29-Apr-2024 04:37:21 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query 
       INSERT INTO vo_actionscheduler_actions ( hook, status, scheduled_date_gmt, scheduled_date_local, schedule, group_id, priority, args )
       SELECT 'wp_mail_smtp_queue_process', 'pending', '2024-04-29 04:37:21', '2024-04-29 05:37:21', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1714365441;s:18:\"\0*\0first_timestamp\";i:1714365441;s:13:\"\0*\0recurrence\";i:60;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1714365441;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:60;}', 2, 10, '[null]' FROM DUAL
       WHERE ( 
       SELECT action_id FROM vo_actionscheduler_actions
       WHERE status IN ( 'pending', 'in-progress' )
       AND hook = 'wp_mail_smtp_queue_process'
       AND group_id = 2
        LIMIT 1 ) IS NULL made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, WPMailSMTP\Core->get_tasks, WPMailSMTP\Tasks\Tasks->init, WPMailSMTP\Tasks\Queue\ProcessQueueTask->init, WPMailSMTP\Tasks\Task->register, WPMailSMTP\Tasks\Task->register_recurring, as_schedule_recurring_action, ActionScheduler_ActionFactory->create, ActionScheduler_ActionFactory->store_unique_action, ActionScheduler_DBStore->save_unique_action, ActionScheduler_DBStore->save_action_to_db
   
       [29-Apr-2024 04:40:57 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query 
       INSERT INTO vo_actionscheduler_actions ( hook, status, scheduled_date_gmt, scheduled_date_local, schedule, group_id, priority, args )
       SELECT 'wp_mail_smtp_queue_process', 'pending', '2024-04-29 04:40:57', '2024-04-29 05:40:57', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1714365657;s:18:\"\0*\0first_timestamp\";i:1714365657;s:13:\"\0*\0recurrence\";i:60;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1714365657;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:60;}', 2, 10, '[null]' FROM DUAL
       WHERE ( 
       SELECT action_id FROM vo_actionscheduler_actions
       WHERE status IN ( 'pending', 'in-progress' )
       AND hook = 'wp_mail_smtp_queue_process'
       AND group_id = 2
        LIMIT 1 ) IS NULL made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, WPMailSMTP\Core->get_tasks, WPMailSMTP\Tasks\Tasks->init, WPMailSMTP\Tasks\Queue\ProcessQueueTask->init, WPMailSMTP\Tasks\Task->register, WPMailSMTP\Tasks\Task->register_recurring, as_schedule_recurring_action, ActionScheduler_ActionFactory->create, ActionScheduler_ActionFactory->store_unique_action, ActionScheduler_DBStore->save_unique_action, ActionScheduler_DBStore->save_action_to_db
   
       [29-Apr-2024 04:47:26 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query 
       INSERT INTO vo_actionscheduler_actions ( hook, status, scheduled_date_gmt, scheduled_date_local, schedule, group_id, priority, args )
       SELECT 'wp_mail_smtp_queue_process', 'pending', '2024-04-29 04:47:26', '2024-04-29 05:47:26', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1714366046;s:18:\"\0*\0first_timestamp\";i:1714366046;s:13:\"\0*\0recurrence\";i:60;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1714366046;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:60;}', 2, 10, '[null]' FROM DUAL
       WHERE ( 
       SELECT action_id FROM vo_actionscheduler_actions
       WHERE status IN ( 'pending', 'in-progress' )
       AND hook = 'wp_mail_smtp_queue_process'
       AND group_id = 2
        LIMIT 1 ) IS NULL made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, WPMailSMTP\Core->get_tasks, WPMailSMTP\Tasks\Tasks->init, WPMailSMTP\Tasks\Queue\ProcessQueueTask->init, WPMailSMTP\Tasks\Task->register, WPMailSMTP\Tasks\Task->register_recurring, as_schedule_recurring_action, ActionScheduler_ActionFactory->create, ActionScheduler_ActionFactory->store_unique_action, ActionScheduler_DBStore->save_unique_action, ActionScheduler_DBStore->save_action_to_db
   
       [29-Apr-2024 04:58:14 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query 
       INSERT INTO vo_actionscheduler_actions ( hook, status, scheduled_date_gmt, scheduled_date_local, schedule, group_id, priority, args )
       SELECT 'wp_mail_smtp_queue_process', 'pending', '2024-04-29 04:58:14', '2024-04-29 05:58:14', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1714366694;s:18:\"\0*\0first_timestamp\";i:1714366694;s:13:\"\0*\0recurrence\";i:60;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1714366694;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:60;}', 2, 10, '[null]' FROM DUAL
       WHERE ( 
       SELECT action_id FROM vo_actionscheduler_actions
       WHERE status IN ( 'pending', 'in-progress' )
       AND hook = 'wp_mail_smtp_queue_process'
       AND group_id = 2
        LIMIT 1 ) IS NULL made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, WPMailSMTP\Core->get_tasks, WPMailSMTP\Tasks\Tasks->init, WPMailSMTP\Tasks\Queue\ProcessQueueTask->init, WPMailSMTP\Tasks\Task->register, WPMailSMTP\Tasks\Task->register_recurring, as_schedule_recurring_action, ActionScheduler_ActionFactory->create, ActionScheduler_ActionFactory->store_unique_action, ActionScheduler_DBStore->save_unique_action, ActionScheduler_DBStore->save_action_to_db
       ```
   
 *  [Nukak Asanansi](https://wordpress.org/support/users/nasanansi/)
 * (@nasanansi)
 * [2 years ago](https://wordpress.org/support/topic/wordpress-database-error-deadlock-7/#post-17724708)
 * Hi [@joewa1980](https://wordpress.org/support/users/joewa1980/),
 * Thanks for getting back to us on this.
 * For us to troubleshoot this issue further, can you please let me know the following?
    1. Have you reactivated your caching plugin again since you deactivated it earlier?
       Was it active when the issue resurfaced?
    2. Please share a list of the plugins you’re running on your site.
    3. Please share screenshots of your Scheduled Actions page on your dashboard (_WP
       Mail SMTP > Tools > Scheduled Actions_) Please be sure not to include any of
       your personal or sensitive details in the screenshots.
 * Once we have these details, we can take a deeper look into this.
 * Thanks 🙂
 *  [Nukak Asanansi](https://wordpress.org/support/users/nasanansi/)
 * (@nasanansi)
 * [2 years ago](https://wordpress.org/support/topic/wordpress-database-error-deadlock-7/#post-17739553)
 * Hi [@joewa1980](https://wordpress.org/support/users/joewa1980/),
 * We haven’t heard back from you, so I’ll be closing this thread for now.
 * If you still run into these issues, please feel free to reply with the requested
   details, and we’ll take a look. 
 * Have a good one 🙂

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

The topic ‘WordPress database error Deadlock’ is closed to new replies.

 * ![](https://ps.w.org/wp-mail-smtp/assets/icon-256x256.png?rev=1755440)
 * [WP Mail SMTP by WPForms - The Most Popular SMTP and Email Log Plugin](https://wordpress.org/plugins/wp-mail-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mail-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mail-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mail-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mail-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mail-smtp/reviews/)

## Tags

 * [ActionScheduler](https://wordpress.org/support/topic-tag/actionscheduler/)
 * [database](https://wordpress.org/support/topic-tag/database/)
 * [deadlock](https://wordpress.org/support/topic-tag/deadlock/)

 * 7 replies
 * 2 participants
 * Last reply from: [Nukak Asanansi](https://wordpress.org/support/users/nasanansi/)
 * Last activity: [2 years ago](https://wordpress.org/support/topic/wordpress-database-error-deadlock-7/#post-17739553)
 * Status: resolved