WordPress database error Commands out of sync; you can't run this command now for query...

#1
Hello!

After changing hosts and servers, setting up LiteSpeed and migrating our site, we are experiencing some bugs in the debug.log that we can't figure out. Searching Google I found that this can possibly be a LiteSpeed issue. Maybe someone can help me get to the bottom of this, and where to start?

I will just sensor any sensitive info from the logs with ***.

1) OS type and Version. If using 64bit OS, please note as such.
CENTOS 7.8 kvm cPanel v90.0.16
Linux 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
cPanel Version 90.0 (build 16)
Apache Version 2.4.46
PHP Version 7.3.23
MySQL Version 5.7.32
Architecture x86_64
Operating System linux
Perl Version 5.16.3
Kernel Version 3.10.0-1127.19.1.el7.x86_64

2) LiteSpeed Version (Version Number + Model: Standard/Enterprise)
Current Version: 5.4.10 (build 1)
Site Owner Plus (5-Domains & 1-Worker) License (with LSCache Standard)

3) If PHP related: PHP version and interface of choice: FCGI, CGI, or LSAPI.
I am not sure where to find what interface I have. I have tried searching through WHM, but can't find anything.

4) All possible related info that you observed before and after, the bug occurred. There more info LiteSpeed developers have, the faster we can resolve your issues.
We just started encountering these kinds of lines in the log. We have also had some random bugs and events that we can't explain, that could be connected somehow. I am sorry I don't have more info here.

Code:
[05-Nov-2020 08:46:43 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT post_id, meta_key, meta_value FROM ***_postmeta WHERE post_id IN (5210) ORDER BY meta_id ASC made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, LiteSpeed\Core->send_headers, LiteSpeed\Tag::output, LiteSpeed\Tag::_finalize, do_action('litespeed_tag_finalize'), WP_Hook->do_action, WP_Hook->apply_filters, LiteSpeed\Thirdparty\WooCommerce->set_tag, get_post_meta, get_metadata, get_metadata_raw, update_meta_cache
[05-Nov-2020 08:46:43 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT option_value FROM ***_options WHERE option_name = '_site_transient_timeout_wc_pb_db_sync_task_runner_manual_lock' LIMIT 1 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_PB_DB_Sync::sync, get_site_transient, wp_cache_get, WP_Object_Cache->get, WP_Object_Cache->_transient_get, get_site_option, get_network_option, get_option
[05-Nov-2020 08:46:43 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT option_value FROM ***_options WHERE option_name = '_site_transient_wc_pb_db_sync_task_runner_manual_lock' LIMIT 1 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_PB_DB_Sync::sync, get_site_transient, wp_cache_get, WP_Object_Cache->get, WP_Object_Cache->_transient_get, get_site_option, get_network_option, get_option
[05-Nov-2020 08:46:43 UTC] WordPress database error Commands out of sync; you can't run this command now for query
            SELECT COUNT(*)
            FROM ***_options
            WHERE option_name LIKE 'wp\\_1\\_wc\\_pb\\_db\\_sync\\_task\\_runner\\_batch\\_%'
         made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_PB_DB_Sync::sync, WC_PB_DB_Sync_Task_Runner->is_queued, WP_Background_Process->is_queue_empty
[05-Nov-2020 08:49:44 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT option_value FROM ***_options WHERE option_name = '_site_transient_timeout_wc_pb_db_sync_task_runner_manual_lock' LIMIT 1 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_PB_DB_Sync::sync, get_site_transient, wp_cache_get, WP_Object_Cache->get, WP_Object_Cache->_transient_get, get_site_option, get_network_option, get_option
[05-Nov-2020 08:49:44 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT option_value FROM ***_options WHERE option_name = '_site_transient_wc_pb_db_sync_task_runner_manual_lock' LIMIT 1 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_PB_DB_Sync::sync, get_site_transient, wp_cache_get, WP_Object_Cache->get, WP_Object_Cache->_transient_get, get_site_option, get_network_option, get_option
[05-Nov-2020 08:49:44 UTC] WordPress database error Commands out of sync; you can't run this command now for query 
            SELECT COUNT(*)
            FROM ***_options
            WHERE option_name LIKE 'wp\\_1\\_wc\\_pb\\_db\\_sync\\_task\\_runner\\_batch\\_%'
         made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_PB_DB_Sync::sync, WC_PB_DB_Sync_Task_Runner->is_queued, WP_Background_Process->is_queue_empty
[05-Nov-2020 08:56:16 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT option_value FROM ***_options WHERE option_name = '_site_transient_timeout_wc_pb_db_sync_task_runner_manual_lock' LIMIT 1 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_PB_DB_Sync::sync, get_site_transient, wp_cache_get, WP_Object_Cache->get, WP_Object_Cache->_transient_get, get_site_option, get_network_option, get_option
[05-Nov-2020 08:56:16 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT option_value FROM ***_options WHERE option_name = '_site_transient_wc_pb_db_sync_task_runner_manual_lock' LIMIT 1 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_PB_DB_Sync::sync, get_site_transient, wp_cache_get, WP_Object_Cache->get, WP_Object_Cache->_transient_get, get_site_option, get_network_option, get_option
[05-Nov-2020 08:56:16 UTC] WordPress database error Commands out of sync; you can't run this command now for query 
            SELECT COUNT(*)
            FROM ***_options
            WHERE option_name LIKE 'wp\\_1\\_wc\\_pb\\_db\\_sync\\_task\\_runner\\_batch\\_%'
         made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_PB_DB_Sync::sync, WC_PB_DB_Sync_Task_Runner->is_queued, WP_Background_Process->is_queue_empty
Also, I see this message in WHM. I am not the person that has set up the server, so I have not done anything with this yet. Could it be related?

"No Cache Management data file found
If you have never scanned and deployed LiteSpeed Cache for WordPress across discovered WordPress sites, visit the Manage Cache Installations page and perform a Scan to get started. Sever-wide deployment can lead to significant performance improvements for said sites, as well as an overall reduction in server load.
If you've been here before, your data file may have been removed due to a necessary data file update. Please perform a new scan to rebuild the file. We apologize for any inconvenience."

5) If you can reproduce the bug, please detail what the steps are.
This is a high traffic site that has just moved servers. I am not sure I can give any reproducible steps right now.

6) Note any errors logged in error.log and stderr.log of LiteSpeed logs directory.
Here are some that can be related:

Code:
WordPress database error Commands out of sync; you can't run this command now for query SELECT option_value FROM ***_options WHERE option_name = '_site_transient_wc_pb_db_sync_task_runner_manual_lock' LIMIT 1 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_PB_DB_Sync::sync, get_site_transient, get_site_option, get_network_option, get_option
WordPress database error Commands out of sync; you can't run this command now for query
            SELECT COUNT(*)
            FROM ***_options
            WHERE option_name LIKE 'wp\\_1\\_wc\\_pb\\_db\\_sync\\_task\\_runner\\_batch\\_%'
         made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_PB_DB_Sync::sync, WC_PB_DB_Sync_Task_Runner->is_queued, WP_Background_Process->is_queue_empty
[UID:1001][6137] Reached max children process limit: 10, extra: 3, current: 13, busy: 8, please increase LSAPI_CHILDREN.
WordPress database error Commands out of sync; you can't run this command now for query SELECT option_value FROM ***_options WHERE option_name = '_site_transient_wc_pb_db_sync_task_runner_manual_lock' LIMIT 1 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_PB_DB_Sync::sync, get_site_transient, get_site_option, get_network_option, get_option
WordPress database error Commands out of sync; you can't run this command now for query
            SELECT COUNT(*)
            FROM ***_options
            WHERE option_name LIKE 'wp\\_1\\_wc\\_pb\\_db\\_sync\\_task\\_runner\\_batch\\_%'
         made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_PB_DB_Sync::sync, WC_PB_DB_Sync_Task_Runner->is_queued, WP_Background_Process->is_queue_empty
[UID:1001][6137] Child process with pid: 11816 was killed by signal: 9, core dump: 0
[UID:1001][17136] Child process with pid: 20112 was killed by signal: 9, core dump: 0

2020-11-05 08:56:28.579892 [NOTICE] [2822] [2822] Cmd from child: [extappkill:28615:-3:0]
2020-11-05 08:56:28.579992 [INFO] [2822] [CLEANUP] Send signal: 15 to process: 28615
2020-11-05 08:56:28.579807 [INFO] [2825] [**SENSITIVE INFO REMOVED**] Abort request processing by PID:28615, kill: 1, begin time: 1, sent time: 1, req processed: 0
2020-11-05 08:56:28.579834 [NOTICE] [2825] sendKillCmdToWatchdog: 'extappkill:28615:-3:0'.
7) Check /tmp/lshttpd for "core dumps"/core files...
I don't see anything related to "core".
 
#2
Some additional information is that I found this in Cache Root Setup:

"You can view your current cache root settings below. Both Server and Virtual Host cache roots should be set before attempting to install and use the LiteSpeed Cache for WordPress plugin."

LiteSpeed Cache for WordPress is already set up, but the Server level and VHost level is not set. I can not confirm if these errors also happened before this was set up. Should I uninstall this plugin, configure these settings again, and then reinstall the plugin?

A course of action would be great, as I am no too familiar with this, but eager to learn and optimize!
 

Pong

Well-Known Member
Staff member
#3
Please don' t mix issues together. They are different issues. The main one is your database error
"WordPress database error Commands out of sync; you can't run this command now for query, database is out of our support scope.
 
#4
Please don' t mix issues together. They are different issues. The main one is your database error
"WordPress database error Commands out of sync; you can't run this command now for query, database is out of our support scope.
I don't have much experience in this, so I just tried to supply as much information as possible that could pertain to the problem. LiteSpeed is logged in the first error line I posted, so I thought it could be connected.
 

NiteWave

Administrator
#5
LiteSpeed Cache for WordPress is already set up, but the Server level and VHost level is not set. I can not confirm if these errors also happened before this was set up. Should I uninstall this plugin, configure these settings again, and then reinstall the plugin?
looks like an reasonable approach. have you tried it ?
 
#6
looks like an reasonable approach. have you tried it ?
I have not, no. But, I have bought a support package from LiteSpeed now. If this problem persists after they have done their magic, I will keep this thread alive. If you don't hear back, this was due to misconfiguration of the server.
 
Top