Title: Database connection issues
Last modified: July 31, 2024

---

# Database connection issues

 *  Resolved [daryltav](https://wordpress.org/support/users/daryltav/)
 * (@daryltav)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/database-connection-issues-3/)
 * hi there
   I’m not a PHP developer but I had action Scheduler installed on my WordPress
   site for our client to help increase the number of processes happening. They 
   are a woocommerce store, a very large 1 with lots of processes that happen.aftera
   few weeks we started noticing our sales dipping and some intermittent errors 
   happening. After checking the logs, I can see that action scheduler most causing
   database connection issues even after increasing the connections and weight time
   in MySQL.
 * After disabled in the plugin, these different errors stopped happening and sales
   returned to normal.
   please could you suggest what went wrong and how we could
   fix it and if we even need to have this app installed? From the documentation
   and your replies to comments I can see that action Scheduler is included within
   woocommerce but I’m not sure if the ability to increase the batch size and number
   of queue etc is available when it is packed with woocommerce
 *     ```wp-block-code
       676	Database	Lost connection to MySQL server during query for query INSERT INTO zoyvT_options (option_name, option_value, autoload) VALUES ('action_scheduler_lock_async-request-runner', '66a954802cd667.70200713|1722373308', 'no') made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->maybe_dispatch_async_request, ActionScheduler_OptionLock->set	Jul 30, 2024 - 22:00:48(1 occurrence logged)677	Database	Lost connection to MySQL server during query for query SELECT option_value FROM zoyvT_options WHERE option_name = 'action_scheduler_lock_async-request-runner' made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->maybe_dispatch_async_request, ActionScheduler_OptionLock->set, ActionScheduler_OptionLock->get_existing_lock	Jul 30, 2024 - 22:00:48(7 occurrences logged)678	Database	Lost connection to MySQL server during query for query SELECT option_value FROM zoyvT_options WHERE option_name = 'action_scheduler_lock_async-request-runner' made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->maybe_dispatch_async_request, ActionScheduler_Lock->is_locked, ActionScheduler_OptionLock->get_expiration, ActionScheduler_OptionLock->get_existing_lock	Jul 30, 2024 - 22:00:48(7 occurrences logged)679	Database	Lost connection to MySQL server during query for query SELECT option_value FROM zoyvT_options WHERE option_name = 'wc_pending_batch_processes' LIMIT 1 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Internal\BatchProcessing\BatchProcessingController->Automattic\WooCommerce\Internal\BatchProcessing\{closure}, Automattic\WooCommerce\Internal\BatchProcessing\BatchProcessingController->remove_or_retry_failed_processors, Automattic\WooCommerce\Internal\BatchProcessing\BatchProcessingController->get_enqueued_processors, get_option	Jul 30, 2024 - 22:00:48(8 occurrences logged)680	Database	The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior. for query SELECT a.action_id FROM zoyvT_actionscheduler_actions a WHERE 1=1 AND a.hook='wc_schedule_pending_batch_processes' AND a.status IN ('in-progress', 'pending') LIMIT 0, 1 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Internal\BatchProcessing\BatchProcessingController->Automattic\WooCommerce\Internal\BatchProcessing\{closure}, Automattic\WooCommerce\Internal\BatchProcessing\BatchProcessingController->remove_or_retry_failed_processors, call_user_func, as_has_scheduled_action, ActionScheduler_Store->query_action, ActionScheduler_DBStore->query_actions	Jul 30, 2024 - 22:00:48(7 occurrences logged)682	Database	Lost connection to MySQL server during query for query INSERT INTO zoyvT_options (option_name, option_value, autoload) VALUES ('action_scheduler_lock_async-request-runner', '66a954340dcee1.95398325|1722373232', 'no') made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->maybe_dispatch_async_request, ActionScheduler_OptionLock->set	Jul 30, 2024 - 21:59:32(1 occurrence logged)692	Database	Lost connection to MySQL server during query for query INSERT INTO zoyvT_options (option_name, option_value, autoload) VALUES ('action_scheduler_lock_async-request-runner', '66a952e7832996.02328847|1722372899', 'no') made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->maybe_dispatch_async_request, ActionScheduler_OptionLock->set	Jul 30, 2024 - 21:53:59(1 occurrence logged)693	Database	Lost connection to MySQL server during query for query INSERT INTO zoyvT_options (option_name, option_value, autoload) VALUES ('action_scheduler_lock_async-request-runner', '66a952a98132c9.59400429|1722372837', 'no') made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->maybe_dispatch_async_request, ActionScheduler_OptionLock->set	Jul 30, 2024 - 21:52:57(1 occurrence logged)925	Database	Malformed packet for query SELECT a.action_id FROM zoyvT_actionscheduler_actions a WHERE 1=1 AND a.hook='wc_schedule_pending_batch_processes' AND a.status IN ('in-progress', 'pending') LIMIT 0, 1 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Internal\BatchProcessing\BatchProcessingController->Automattic\WooCommerce\Internal\BatchProcessing\{closure}, Automattic\WooCommerce\Internal\BatchProcessing\BatchProcessingController->remove_or_retry_failed_processors, call_user_func, as_has_scheduled_action, ActionScheduler_Store->query_action, ActionScheduler_DBStore->query_actions	Jul 30, 2024 - 19:59:31(1 occurrence logged)944	Database	Lost connection to MySQL server during query for query INSERT INTO zoyvT_options (option_name, option_value, autoload) VALUES ('action_scheduler_lock_async-request-runner', '66a936444f5a81.00199070|1722365568', 'no') made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->maybe_dispatch_async_request, ActionScheduler_OptionLock->set
       ```
   
 * any information will be much appreciated, no caching was enabled, including no
   object caching

Viewing 1 replies (of 1 total)

 *  [Thomas Vu](https://wordpress.org/support/users/thomasvu/)
 * (@thomasvu)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/database-connection-issues-3/#post-17934796)
 * Hey there,
   I understand that you installed the [Action Scheduler](https://wordpress.org/plugins/action-scheduler/)
   extension on your client’s site to manage and help increase the number of processes
   that can occur, by increasing batch size, number of queue, etc. To begin support,
   I’d like to clarify some information:1. From my understanding, it seems like 
   the issue doesn’t persist when the [Action Scheduler](https://wordpress.org/plugins/action-scheduler/)
   plugin is disabled — is that correct?
 * 2. Can you please go in more detail about how exactly you are implementing this
   with the Action Scheduler? Including screenshots using a tool like [Snipboard.io](https://snipboard.io/)
   would be super helpful to clarify our understanding of the matter.
 * 3. Based on my understanding, it seems like you might be using the [WP-CLI](https://actionscheduler.org/wp-cli/)
   to for processing certain actions and you want to know if that can be done with
   just WooCommerce core (which includes the Action Scheduler), rather than needing
   this standalone Action Scheduler plugin — is that correct?
   If that’s the case,
   then you should be able to perform the same commands. I recommend testing this
   out for yourself on a test site and letting us know if you come across any issues.
   I hope this helps guide you in the right direction. If you have additional questions
   or information, please feel free to share them with us. 🙂

Viewing 1 replies (of 1 total)

The topic ‘Database connection issues’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/action-scheduler.svg)
 * [Action Scheduler](https://wordpress.org/plugins/action-scheduler/)
 * [Support Threads](https://wordpress.org/support/plugin/action-scheduler/)
 * [Active Topics](https://wordpress.org/support/plugin/action-scheduler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/action-scheduler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/action-scheduler/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Thomas Vu](https://wordpress.org/support/users/thomasvu/)
 * Last activity: [1 year, 9 months ago](https://wordpress.org/support/topic/database-connection-issues-3/#post-17934796)
 * Status: resolved