I made a Wordpress plugin that imports some products (few hundreds) from API to Woocommerce. The problem is that after about 10 minutes (max execution time is set to unlimited) I'm getting this error multiple times with option_name different (there are some taxonomies for attributes):
WordPress database error Commands out of sync; you can't run this command now for query SELECT autoload FROM wp_options WHERE option_name = '_transient_wc_layered_nav_counts_pa_tehnologii-display' made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Cache_Helper::delete_transients_on_shutdown, delete_transient, delete_option
In other moments, the job which is importing products is stopping without any error message.
I tried the plugin on other hosts and no problem. Any ideas?