• Resolved Joe

    (@joewa1980)


    We get this series of database deadlock errors every couple of days. Referencing WP Mail SMTP. Any ideas? Thanks!

    [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)
  • Hi @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

    (@joewa1980)

    Thanks @nasanansi – I saw this suggestion elsewhere yesterday so waiting a couple of days to see if we experience the deadlocks again.

    Hi @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

    (@joewa1980)

    Thanks @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

    (@joewa1980)

    It happened today, 11 days after the previous occurrence though.

    [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

    Hi @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 ??

    Hi @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.