Error: Database Duplicate entry in woocommerce_sessions
-
Hi,
For one week, its the second time I get Mysql error in my logs: Duplicate entry in woocommerce_sessions
WordPress Duplicate entry 'aa45d9a84b52fe973d32615b35712d0b' for key 'PRIMARY' pour la requ\xc3\xaate INSERT INTOXXX_woocommerce_sessions(session_key,session_value,session_expiry) VALUES ('aa45d9a84b52fe973d32615b35712d0b', 'a:19:{s:21:\\"removed_cart_contents\\";s:6:\\"a:0:{}\\";s:10:\\"wc_notices\\";s:345:\\"a:1:{s:7:\\"success\\";a:2:{i:0;s:148:\\"<a href=\\"http://www.somewebsite.com/store\\" class=\\"button wc-forward\\">Poursuivre les achats</a> «CopyTrans» a \xc3\xa9t\xc3\xa9 ajout\xc3\xa9 \xc3\xa0 votre panier.\\";i:1;s:145:\\"<a href=\\"http://www.somewebsite.com/store\\" class=\\"button wc-forward\\">Poursuivre les achats</a> «4 Pack» a \xc3\xa9t\xc3\xa9 ajout\xc3\xa9 \xc3\xa0 votre panier.\\";}}\\";s:4:\\"cart\\";s:403:\\"a:1:{s:32:\\"c4851e8e264415c4094e4e85b0baa7cc\\";a:9:{s:10:\\"product_id\\";i:1227;s:12:\\"variation_id\\";i:0;s:9:\\"variation\\";a:0:{}s:8:\\"quantity\\";i:1;s:10:\\"line_total\\";d:29.989999999999998436805981327779591083526611328125;s:8:\\"line_tax\\";i:0;s:13:\\"line_subtotal\\";d:29.989999999999998436805981327779591083526611328125;s:17:\\"line_subtotal_tax\\";i:0;s:13:\\"line_tax_data\\";a:2:{s:5:\\"total\\";a:0:{}s:8:\\"subtotal\\";a:0:{}}}}\\";s:15:\\"applied_coupons\\";s:6:\\"a:0:{}\\";s:23:\\"coupon_discount_amounts\\";s:6:\\"a:0:{}\\";s:27:\\"coupon_discount_tax_amounts\\";s:6:\\"a:0:{}\\";s:19:\\"cart_contents_total\\";d:29.989999999999998436805981327779591083526611328125;s:5:\\"total\\";i:0;s:8:\\"subtotal\\";d:29.989999999999998436805981327779591083526611328125;s:15:\\"subtotal_ex_tax\\";d:29.989999999999998436805981327779591083526611328125;s:9:\\"tax_total\\";i:0;s:5:\\"taxes\\";s:6:\\"a:0:{}\\";s:14:\\"shipping_taxes\\";s:6:\\"a:0:{}\\";s:13:\\"discount_cart\\";i:0;s:17:\\"discount_cart_tax\\";i:0;s:14:\\"shipping_total\\";i:0;s:18:\\"shipping_tax_total\\";i:0;s:9:\\"fee_total\\";i:0;s:4:\\"fees\\";s:6:\\"a:0:{}\\";}', 1455958760) faite par shutdown_action_hook, do_action('shutdown'), call_user_func_array, WC_Session_Handler->save_data, W3_Db->insert, W3_DbCache->insert, W3_DbCallUnderlying->insert, W3_Db->insert, W3_DbProcessor->insert, W3_Db->default_insert, W3_Db->query, W3_DbProcessor->query, W3_Db->default_queryIn my particular setup, Mysql replication is activated between 2 servers. What I highly suspect, is that your new session ID generation does not take that into account. I.e. it does not use Mysql for ID generation, but has its own engine and therefore can cause ID conflicts between 2 or more servers in replication array. If that turns out to be the case, its a very nasty and important bug.
Thanks for the great support.
The topic ‘Error: Database Duplicate entry in woocommerce_sessions’ is closed to new replies.