WordPress database error Deadlock: wp_mail_smtp_queue_processwp_mail_smtp_queue_
-
Constant error:
WordPress database error Deadlock found when trying to get lock; try restarting transaction for query
INSERT INTO QCN_actionscheduler_actions (?hook
,status
,scheduled_date_gmt
,scheduled_date_local
,schedule
,group_id
,priority
,args
)
SELECT ‘wp_mail_smtp_queue_process’, ‘pending’, ‘2024-10-29 14:18:19’, ‘2024-10-29 07:18:19’, ‘O:32:\”ActionScheduler_IntervalSchedule\”:5:{s:22:\”\0*\0scheduled_timestamp\”;i:1730211499;s:18:\”\0*\0first_timestamp\”;i:1730211499;s:13:\”\0*\0recurrence\”;i:60;s:49:\”\0ActionScheduler_IntervalSchedule\0start_timestamp\”;i:1730211499;s:53:\”\0ActionScheduler_IntervalSchedule\0interval_in_seconds\”;i:60;}’, 3, 10, ‘[null]’ FROM DUAL
WHERE (
SELECT action_id FROM QCN_actionscheduler_actions
WHERE status IN (?‘pending’, ‘in-progress’ )
AND hook = ‘wp_mail_smtp_queue_process’
ANDgroup_id
= 3
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 @lokmeup,
Thank you for bringing this issue to out attention. The error message you’re encountering,
WordPress database error: deadlock found when trying to get lock; try restarting transaction
, typically occurs during database operations when multiple queries are trying to access the same resources simultaneously.Are you using any caching or performance plugins on your site? When you have a moment, please provide the following information. This will help our developers investigate the issue further.
- The mailer that you have configured using the WP Mail SMTP plugin.
- Please provide a list of the plugins currently installed on your site (you can copy the plugin list from WordPress Tools – > Site Health -> Info -> Active Plugins area.)
Once we have more information, we should be able to assist you further.
Thanks!
Are you using any caching or performance plugins on your site?
WP-Optimize – Clean, Compress, Cache – page cache
atec Cache APCu – object cache
Cloudflare
The mailer that you have configured using the WP Mail SMTP plugin.
Brevo
Please provide a list of the plugins currently installed on your site
Action Scheduler Version 3.8.2 by Automattic
Admin Menu Editor Version 1.12.4 by Janis Elsts
Akismet Anti-spam: Spam Protection Version 5.3.3 by Automattic – Anti-spam Teamatec
Cache APCu Version 2.0.10 by Chris Ahrweiler
Change WordPress Login Logo Version 1.3 by Boopathi Rajan
Child Theme Configurator Version 2.6.6 by Lilaea Media
Cloudflare Version 4.12.8 by Cloudflare, Inc.
Duplicate Page Version 4.5.4 by mndpsingh287
Elementor Version 3.25.3 by Elementor.com
Elementor Pro Version 3.25.1 by Elementor.com
Error Log Monitor Version 1.7.10 by Janis Elsts
File Manager Advanced Version 5.2.10 by modalweb
Login Logout Menu Version 1.5.2 by WPBrigade
Newsletter Version 8.6.0 by Stefano Lissa & The Newsletter Team
Newsletter – Addons Manager and Support Version 1.3.2 by The Newsletter Team
Newsletter – Automated Newsletters Version 4.7.8 by The Newsletter Team
Newsletter – Bounce Addon Version 1.3.3 by The Newsletter Team
Newsletter – Reports and Retargeting Version 4.6.1 by The Newsletter Team
Newsletter – WPForms Addon Version 1.3.2 by The Newsletter Team
Newsletter – WP Users Addon Version 1.4.5 by The Newsletter Team
Ocean Extra Version 2.4.2 by Ocean
WPOcean Social Sharing Version 2.2.0 by Ocean
WPRedirection Version 5.5.0 by John Godley
Remove Dashboard Access Version 1.2 by TrustedLogin
Site Kit by Google Version 1.138.0 by Google
UpdraftPlus – Backup/Restore Version 1.24.6 by TeamUpdraft, DavidAnderson
Wordfence Security Version 7.11.7 by Wordfence
WP-Optimize – Clean, Compress, Cache Version 3.7.0 by TeamUpdraft, DavidAnderson
WP Auto Updater Version 1.7.3 by thingsym
WP Crontrol Version 1.17.0 by John Blackbourn
WPForms Version 1.9.1.6 by WPForms
WPForms Stripe Pro Version 3.4.0 by WPForms
WPForms User Registration Version 2.7.0 by WPForms
WP Mail SMTP Version 4.1.1 by WP Mail SMTP
WPS Hide Login Version 1.9.17.1 by WPServeur, NicolasKulka, wpformation
XML Sitemap Generator for Google Version 4.1.21 by Auctollo
Yoast SEO Version 23.7 by Team Yoast
Any update on help?
Hi @lokmeup,
Thank you for providing the additional details!
I have shared the information with one of our developers and will update you as soon as I receive more information from them.
Thank you for your patience in the meantime!
Hi @lokmeup,
Thank you for your patience!
Based on the information you’ve shared, it seems that you are running Action Scheduler as a standalone plugin.
Please note that most plugins, such as WP Mail SMTP, WooCommerce, and WPForms, include the Action Scheduler library. This means you typically don’t need an external plugin to manage scheduled actions and tasks.
Could you please try deactivating the Action Scheduler plugin on your WordPress site to see if that resolves the issue?
Let us know how it goes. Thank you!
Sure can.
I only installed Action Scheduler plugin AFTER the above errors were noticed, thinking it might help in some way.
I’ll deactivate it now and post the error when they popup.
Thanks!
Error from today, with Action Scheduler plugin deactivated:
Nov 08, 01:20:03
WordPress database error Deadlock found when trying to get lock; try restarting transaction for query
INSERT INTO QCN_actionscheduler_actions (hook
,status
,scheduled_date_gmt
,scheduled_date_local
,schedule
,group_id
,priority
,args
)
SELECT ‘wp_mail_smtp_queue_process’, ‘pending’, ‘2024-11-08 09:20:03’, ‘2024-11-08 01:20:03’, ‘O:32:\”ActionScheduler_IntervalSchedule\”:5:{s:22:\”\0*\0scheduled_timestamp\”;i:1731057603;s:18:\”\0*\0first_timestamp\”;i:1731057603;s:13:\”\0*\0recurrence\”;i:60;s:49:\”\0ActionScheduler_IntervalSchedule\0start_timestamp\”;i:1731057603;s:53:\”\0ActionScheduler_IntervalSchedule\0interval_in_seconds\”;i:60;}’, 3, 10, ‘[null]’ FROM DUAL
WHERE (
SELECT action_id FROM QCN_actionscheduler_actions
WHERE status IN ( ‘pending’, ‘in-progress’ )
AND hook = ‘wp_mail_smtp_queue_process’
ANDgroup_id
= 3
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_dbHi.
I have the same problem, it occurs so many times a day:[10-Nov-2024 23:32:09 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query
INSERT INTO wp_actionscheduler_actions (hook
,status
,scheduled_date_gmt
,scheduled_date_local
,schedule
,group_id
,priority
,args
)
SELECT 'wp_mail_smtp_queue_process', 'pending', '2024-11-10 23:32:09', '2024-11-11 00:32:09', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1731281529;s:18:\"\0*\0first_timestamp\";i:1731281529;s:13:\"\0*\0recurrence\";i:60;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1731281529;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:60;}', 5, 10, '[null]' FROM DUAL
WHERE (
SELECT action_id FROM wp_actionscheduler_actions
WHERE status IN ( 'pending', 'in-progress' )
AND hook = 'wp_mail_smtp_queue_process'
ANDgroup_id
= 5
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
[11-Nov-2024 01:16:09 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query
INSERT INTO wp_actionscheduler_actions (hook
,status
,scheduled_date_gmt
,scheduled_date_local
,schedule
,group_id
,priority
,args
)
SELECT 'wp_mail_smtp_queue_process', 'pending', '2024-11-11 01:16:09', '2024-11-11 02:16:09', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1731287769;s:18:\"\0*\0first_timestamp\";i:1731287769;s:13:\"\0*\0recurrence\";i:60;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1731287769;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:60;}', 5, 10, '[null]' FROM DUAL
WHERE (
SELECT action_id FROM wp_actionscheduler_actions
WHERE status IN ( 'pending', 'in-progress' )
AND hook = 'wp_mail_smtp_queue_process'
ANDgroup_id
= 5
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
[11-Nov-2024 01:16:09 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query
INSERT INTO wp_actionscheduler_actions (hook
,status
,scheduled_date_gmt
,scheduled_date_local
,schedule
,group_id
,priority
,args
)
SELECT 'wp_mail_smtp_queue_process', 'pending', '2024-11-11 01:16:09', '2024-11-11 02:16:09', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1731287769;s:18:\"\0*\0first_timestamp\";i:1731287769;s:13:\"\0*\0recurrence\";i:60;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1731287769;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:60;}', 5, 10, '[null]' FROM DUAL
WHERE (
SELECT action_id FROM wp_actionscheduler_actions
WHERE status IN ( 'pending', 'in-progress' )
AND hook = 'wp_mail_smtp_queue_process'
ANDgroup_id
= 5
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
[11-Nov-2024 01:16:09 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query
INSERT INTO wp_actionscheduler_actions (hook
,status
,scheduled_date_gmt
,scheduled_date_local
,schedule
,group_id
,priority
,args
)
SELECT 'wp_mail_smtp_queue_process', 'pending', '2024-11-11 01:16:09', '2024-11-11 02:16:09', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1731287769;s:18:\"\0*\0first_timestamp\";i:1731287769;s:13:\"\0*\0recurrence\";i:60;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1731287769;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:60;}', 5, 10, '[null]' FROM DUAL
WHERE (
SELECT action_id FROM wp_actionscheduler_actions
WHERE status IN ( 'pending', 'in-progress' )
AND hook = 'wp_mail_smtp_queue_process'
ANDgroup_id
= 5
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- This reply was modified 2 weeks ago by martinmaurer.
Hi @martinmaurer,
I apologize for the inconvenience caused!
Are you also using any caching or performance plugins on your site? When you have a moment, please provide the following information. This will help our developers investigate the issue further.
- The mailer that you have configured using the WP Mail SMTP plugin.
- Please provide a list of the plugins currently installed on your site (you can copy the plugin list from WordPress Tools – > Site Health -> Info -> Active Plugins area.)
Once we have more information, we should be able to assist you further.
Thanks!
WordPress database error Deadlock found when trying to get lock; try restarting transaction for query
INSERT INTO QCN_actionscheduler_actions (?hook
,status
,scheduled_date_gmt
,scheduled_date_local
,schedule
,group_id
,priority
,args
)
SELECT ‘wp_mail_smtp_queue_process’, ‘pending’, ‘2024-11-18 17:10:30’, ‘2024-11-18 09:10:30’, ‘O:32:\”ActionScheduler_IntervalSchedule\”:5:{s:22:\”\0*\0scheduled_timestamp\”;i:1731949830;s:18:\”\0*\0first_timestamp\”;i:1731949830;s:13:\”\0*\0recurrence\”;i:60;s:49:\”\0ActionScheduler_IntervalSchedule\0start_timestamp\”;i:1731949830;s:53:\”\0ActionScheduler_IntervalSchedule\0interval_in_seconds\”;i:60;}’, 3, 10, ‘[null]’ FROM DUAL
WHERE (
SELECT action_id FROM QCN_actionscheduler_actions
WHERE status IN (?‘pending’, ‘in-progress’ )
AND hook = ‘wp_mail_smtp_queue_process’
ANDgroup_id
= 3
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- This reply was modified 1 week ago by TomorrowU.org.
Hi @lokmeup,
Thanks for getting in touch with the additional details! Our developers have requested the following information and have been asked to follow the instructions below.
- Head over to WP Mail SMTP → Tools → Scheduled Actions.
- Share the stats on the each tab (All, Complete, Failed and Pending)
- Switch to the Complete and Failed tabs, and bulk-delete all occurrences.
- Monitor your site again to see whether errors are no longer appearing in logs.
Let us know how it goes. Thanks!
All = 2682
Completed = 1658
Failed = 1007
Pending = 17
Complete?and?Failed?tabs = DELETED
Hi @lokmeup,
I have shared that information with our developers.
In the meantime, please monitor your site and let us know how it goes.
Thanks!
- You must be logged in to reply to this topic.