Title: WordPress database error
Last modified: September 21, 2021

---

# WordPress database error

 *  Resolved [myacoub](https://wordpress.org/support/users/myacoub/)
 * (@myacoub)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-169/)
 * Some of our site users fail at the checkout point and we do see the following
   errors on our logs. Help is appreciated.
 * ====== 1st error ==========
    mod_fcgid: stderr: PHP Fatal error: Allowed memory
   size of 536870912 bytes exhausted (tried to allocate 135168 bytes) in /var/www/
   vhosts/recreational8.com/httpdocs/wp-includes/wp-db.php on line 2056, referer:
   [https://recreational8.com/checkout/](https://recreational8.com/checkout/)
 * ====== 2nd error ============
    `mod_fcgid: stderr: WordPress database error Commands
   out of sync; you can't run this command now for query INSERT INTO UnHs9_woocommerce_sessions(`
   session_key`,`session_value`,`session_expiry`) VALUES ('1', 'a:17:{s:4:\\"cart\\";
   s:414:\\"a:1:{s:32:\\"a6eea5aa95cc31102ab50d87b12ccde0\\";a:11:{s:3:\\"key\\";
   s:32:\\"a6eea5aa95cc31102ab50d87b12ccde0\\";s:10:\\"product_id\\";i:18588;s:12:\\"
   variation_id\\";i:0;s:9:\\"variation\\";a:0:{}s:8:\\"quantity\\";i:1;s:9:\\"data_hash\\";
   s:32:\\"b5c1d5ca8bae6d4896cf1807cdf763f0\\";s:13:\\"line_tax_data\\";a:2:{s:8:\\"
   subtotal\\";a:0:{}s:5:\\"total\\";a:0:{}}s:13:\\"line_subtotal\\";d:10;s:17:\\"
   line_subtotal_tax\\";i:0;s:10:\\"line_total\\";d:0.1;s:8:\\"line_tax\\";i:0;}}\\";
   s:11:\\"cart_totals\\";s:398:\\"a:15:{s:8:\\"subtotal\\";s:2:\\"10\\";s:12:\\"
   subtotal_tax\\";i:0;s:14:\\"shipping_total\\";s:4:\\"7.75\\";s:12:\\"shipping_tax\\";
   i:0;s:14:\\"shipping_taxes\\";a:0:{}s:14:\\"discount_total\\";d:9.9;s:12:\\"discount_tax\\";
   i:0;s:19:\\"cart_contents_total\\";s:3:\\"0.1\\";s:17:\\"cart_contents_tax\\";
   i:0;s:19:\\"cart_contents_taxes\\";a:0:{}s:9:\\"fee_total\\";s:1:\\"0\\";s:7:\\"
   fee_tax\\";i:0;s:9:\\"fee_taxes\\";a:0:{}s:5:\\"total\\";s:4:\\"7.85\\";s:9:\\"
   total_tax\\";d:0;}\\";s:15:\\"applied_coupons\\";s:25:\\"a:1:{i:0;s:8:\\"n7zszck7\\";}\\";
   s:22:\\"coupon_discount_totals\\";s:27:\\"a:1:{s:8:\\"n7zszck7\\";d:9.9;}\\";
   s:26:\\"coupon_discount_tax_totals\\";s:25:\\"a:1:{s:8:\\"n7zszck7\\";i:0;}\\";
   s:21:\\"removed_cart_contents\\";s:1646:\\"a:4:{s:32:\\"645098b086d2f9e1e0e939c27f9f2d6f\\";
   a:11:{s:3:\\"key\\";s:32:\\"645098b086d2f9e1e0e939c27f9f2d6f\\";s:10:\\"product_id\\";
   i:1809;s:12:\\"variation_id\\";i:0;s:9:\\"variation\\";a:0:{}s:8:\\"quantity\\";
   i:1;s:9:\\"data_hash\\";s:32:\\"b5c1d5ca8bae6d4896cf1807cdf763f0\\";s:13:\\"line_tax_data\\";
   a:2:{s:8:\\"subtotal\\";a:0:{}s:5:\\"total\\";a:0:{}}s:13:\\"line_subtotal\\";
   d:34.99;s:17:\\"line_subtotal_tax\\";i:0;s:10:\\"line_total\\";d:0.35;s:8:\\"
   line_tax\\";i:0;}s:32:\\"3fab5890d8113d0b5a4178201dc842ad\\";a:11:{s:3:\\"key\\";
   s:32:\\"3fab5890d8113d0b5a4178201dc842ad\\";s:10:\\"product_id\\";i:1803;s:12:\\"
   variation_id\\";i:0;s:9:\\"variation\\";a:0:{}s:8:\\"quantity\\";i:2;s:9:\\"data_hash\\";
   s:32:\\"b5c1d5ca8bae6d4896cf1807cdf763f0\\";s:13:\\"line_tax_data\\";a:2:{s:8:\\"
   subtotal\\";a:0:{}s:5:\\"total\\";a:0:{}}s:13:\\"line_subtotal\\";d:69.98;s:17:\\"
   line_subtotal_tax\\";i:0;s:10:\\"line_total\\";d:0.7;s:8:\\"line_tax\\";i:0;}
   s:32:\\"838aac83e00e8c5ca0f839c96d6cb3be\\";a:11:{s:3:\\"key\\";s:32:\\"838aac83e00e8c5ca0f839c96d6cb3be\\";
   s:10:\\"product_id\\";i:6042;s:12:\\"variation_id\\";i:0;s:9:\\"variation\\";
   a:0:{}s:8:\\"quantity\\";i:1;s:9:\\"data_hash\\";s:32:\\"b5c1d5ca8bae6d4896cf1807cdf763f0\\";
   s:13:\\"line_tax_data\\";a:2:{s:8:\\"subtotal\\";a:0:{}s:5:\\"total\\";a:0:{}}
   s:13:\\"line_subtotal\\";d:34.99;s:17:\\"line_subtotal_tax\\";i:0;s:10:\\"line_total\\";
   d:0.35;s:8:\\"line_tax\\";i:0;}s:32:\\"a6eea5aa95cc31102ab50d87b12ccde0\\";a:
   11:{s:3:\\"key\\";s:32:\\"a6eea5aa95cc31102ab50d87b12ccde0\\";s:10:\\"product_id\\";
   i:18588;s:12:\\"variation_id\\";i:0;s:9:\\"variation\\";a:0:{}s:8:\\"quantity\\";
   i:1;s:9:\\"data_hash\\";s:32:\\"b5c1d5ca8bae6d4896cf1807cdf763f0\\";s:13:\\"line_tax_data\\";
   a:2:{s:8:\\"subtotal\\";a:0:{}s:5:\\"total\\";a:0:{}}s:13:\\"line_subtotal\\";
   d:10;s:17:\\"line_subtotal_tax\\";i:0;s:10:\\"line_total\\";d:0.1;s:8:\\"line_tax\\";
   i:0;}}\\";s:16:\\"wca_session_data\\";s:0:\\"\\";s:19:\\"wcp_passed_rule_ids\\";
   s:17:\\"a:1:{i:0;i:9917;}\\";s:22:\\"shipping_for_package_0\\";s:790:\\"a:2:{
   s:12:\\"package_hash\\";s:40:\\"wc_ship_ff4133a39e243f02e4ecc683b81c5cfa\\";s:
   5:\\"rates\\";a:2:{s:11:\\"flat_rate:2\\";O:16:\\"WC_Shipping_Rate\\":2:{s:7:\\"\\
   0*\\0data\\";a:6:{s:2:\\"id\\";s:11:\\"flat_rate:2\\";s:9:\\"method_id\\";s:9:\\"
   flat_rate\\";s:11:\\"instance_id\\";i:2;s:5:\\"label\\";s:41:\\"USPS First Class-
   Shipping & Handling\\";s:4:\\"cost\\";s:4:\\"7.75\\";s:5:\\"taxes\\";a:0:{}}s:
   12:\\"\\0*\\0meta_data\\";a:1:{s:5:\\"Items\\";s:51:\\"Delta-8 THC Assorted Gummies
   Sampler Pack &times; 1\\";}}s:11:\\"flat_rate:5\\";O:16:\\"WC_Shipping_Rate\\":
   2:{s:7:\\"\\0*\\0data\\";a:6:{s:2:\\"id\\";s:11:\\"flat_rate:5\\";s:9:\\"method_id\\";
   s:9:\\"flat_rate\\";s:11:\\"instance_id\\";i:5;s:5:\\"label\\";s:42:\\"USPS Priority
   Mail-Shipping & Handling\\";s:4:\\"cost\\";s:5:\\"10.00\\";s:5:\\"taxes\\";a:
   0:{}}s:12:\\"\\0*\\0meta_data\\";a:1:{s:5:\\"Items\\";s:51:\\"Delta-8 THC Assorted
   Gummies Sampler Pack &times; 1\\";}}}}\\";s:25:\\"previous_shipping_methods\\";
   s:62:\\"a:1:{i:0;a:2:{i:0;s:11:\\"flat_rate:2\\";i:1;s:11:\\"flat_rate:5\\";}}\\";
   s:23:\\"chosen_shipping_methods\\";s:29:\\"a:1:{i:0;s:11:\\"flat_rate:2\\";}\\";
   s:22:\\"shipping_method_counts\\";s:14:\\"a:1:{i:0;i:2;}\\";s:8:\\"customer\\";
   s:901:\\"a:27:{s:2:\\"id\\";s:1:\\"0\\";s:13:\\"date_modified\\";s:0:\\"\\";s:
   8:\\"postcode\\";s:5:\\"33414\\";s:4:\\"city\\";s:15:\\"West Palm Beach\\";s:
   9:\\"address_1\\";s:18:\\"15610 Latina place\\";s:7:\\"address\\";s:18:\\"15610
   Latina place\\";s:9:\\"address_2\\";s:0:\\"\\";s:5:\\"state\\";s:2:\\"FL\\";s:
   7:\\"country\\";s:2:\\"US\\";s:17:\\"shipping_postcode\\";s:5:\\"33414\\";s:13:\\"
   shipping_city\\";s:15:\\"West Palm Beach\\";s:18:\\"shipping_address_1\\";s:18:\\"
   15610 Latina place\\";s:16:\\"shipping_address\\";s:18:\\"15610 Latina place\\";
   s:18:\\"shipping_address_2\\";s:0:\\"\\";s:14:\\"shipping_state\\";s:2:\\"FL\\";
   s:16:\\"shipping_country\\";s:2:\\"US\\";s:13:\\"is_vat_exempt\\";s:0:\\"\\";
   s:19:\\"calculated_shipping\\";s:0:\\"\\";s:10:\\"first_name\\";s:5:\\"robyn\\";
   s:9:\\"last_name\\";s:6:\\"powell\\";s:7:\\"company\\";s:0:\\"\\";s:5:\\"phone\\";
   s:10:\\"5615555555\\";s:5:\\"email\\";s:18:\\"mouhab76@gamil.com\\";s:19:\\"shipping_first_name\\";
   s:5:\\"robyn\\";s:18:\\"shipping_last_name\\";s:6:\\"powell\\";s:16:\\"shipping_company\\";
   s:0:\\"\\";s:14:\\"shipping_phone\\";s:10:\\"5615555555\\";}\\";s:10:\\"wc_notices\\";
   N;s:21:\\"chosen_payment_method\\";s:35:\\"nmi_gateway_woocommerce_credit_card\\";
   s:22:\\"mailchimp_landing_site\\";b:0;s:22:\\"order_awaiting_payment\\";i:25246;}',
   1632276104), referer: https://recreational8.com/checkout/`
 * ====== 3rd error ===========
    mod_fcgid: stderr: \t\t\t\t\tON DUPLICATE KEY UPDATE`
   session_value` = VALUES(`session_value`), `session_expiry` = VALUES(`session_expiry`)
   made by shutdown_action_hook, do_action(‘shutdown’), WP_Hook->do_action, WP_Hook-
   >apply_filters, WC_Session_Handler->save_data, referer: [https://recreational8.com/checkout/](https://recreational8.com/checkout/)
 * We recognize the error that it is on the database/MySQL level, but we can’t figure
   out how to solve this..
 * The server has 16GB and all of them are allowed and set to WordPress (WP_config.
   php) and PHP (php.ini) also for your info we are using PHP 7.4
 * Any clue what do we need to look at?
 * Mouhab

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [Rynald0s](https://wordpress.org/support/users/rynald0s/)
 * (@rynald0s)
 * Automattic Happiness Engineer
 * [4 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-169/#post-14896146)
 * Hi [@myacoub](https://wordpress.org/support/users/myacoub/)!
 * The first error is related to your hosting package and you will need to increase
   the amount of RAM that is allocated to your site.
 * You can either ask your host to increase the limits, or increase is yourself 
   following the guide below:
 * [https://docs.woothemes.com/document/increasing-the-wordpress-memory-limit/](https://docs.woothemes.com/document/increasing-the-wordpress-memory-limit/)
 * As for the second error, it seems like it is related to the first error, and 
   by upping the memory, should be resolved. In case, however, the second error 
   is not related, you can work through some of the troubleshooting here:
 * [https://rankmath.com/kb/wordpress-database-error-commands-out-of-sync/](https://rankmath.com/kb/wordpress-database-error-commands-out-of-sync/)
 * Cheers!
 *  Thread Starter [myacoub](https://wordpress.org/support/users/myacoub/)
 * (@myacoub)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-169/#post-14896186)
 * Dear Rynaldos, (@rynald0s)
 * Many thanks for your response, i will try to perform as per your guidance here.
   But just for your info, the server HW has 16GB of RAM and the WordPress config
   file has been set to have them all! Also the php.ini is set for 512MB!
 * Anyways, i will test and get to you back with some results to discuss specially
   on the DB syn side. I think it maybe corrupted!
 * Did you see any problem with the third error line i posted above??
 * Mouhab
 *  [con](https://wordpress.org/support/users/conschneider/)
 * (@conschneider)
 * Engineer
 * [4 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-169/#post-14897067)
 * Hi again,
 * > Anyways, i will test and get to you back with some results to discuss specially
   > on the DB syn side. I think it maybe corrupted!
 * ✅ Happy testing.
 * > Did you see any problem with the third error line i posted above??
 * Could be a caching problem, but it also looks very similar to your 2nd error 
   message entry which also is complaining about session troubles. I would apply
   your tests first and see how this fares. Afterwards we can see if the 3rd error
   persists.
 * Kind regards,
 *  [mathewborja](https://wordpress.org/support/users/mathewborja/)
 * (@mathewborja)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-169/#post-14897271)
 * [@rynald0s](https://wordpress.org/support/users/rynald0s/) [@conschneider](https://wordpress.org/support/users/conschneider/)
   This is a widespread issue and is caused by a memory leak somewhere. Hundreds
   of users reporting the same issue and no access to wp-admin after update.
 *  Thread Starter [myacoub](https://wordpress.org/support/users/myacoub/)
 * (@myacoub)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-169/#post-14897353)
 * [@mathewborja](https://wordpress.org/support/users/mathewborja/)
 * In my case i still can access the wp-admin yet my /checkout on wooCommerce is
   troubled!!
 * Always get Internal error code 500 on the page and some times the order gets 
   processed and sometimes it gives “fail” on wooCommerce!
 * What do you mean by after update? Yes, i saw a message earlier on wooCommerce
   that the Database was updated. Did you mean a DB update or WordPress update or
   wooCommerce update. for your info, we are using PHP 7.4
 * Mouhab
 *  Plugin Support [abwaita a11n](https://wordpress.org/support/users/abwaita/)
 * (@abwaita)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-169/#post-14897738)
 * Thanks for your reply [@myacoub](https://wordpress.org/support/users/myacoub/),
   it seems that [@mathewborja](https://wordpress.org/support/users/mathewborja/)
   is referring to a different issue altogether. For your specific case, let us 
   know how it goes after increasing the memory.
 * _Just to mention, [@mathewborja](https://wordpress.org/support/users/mathewborja/),
   we’d prefer if you created a new separate thread if you’re facing an issue accessing
   WP-Admin after updating your WooCommerce plugin. _
 * Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘WordPress database error’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 6 replies
 * 5 participants
 * Last reply from: [abwaita a11n](https://wordpress.org/support/users/abwaita/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-169/#post-14897738)
 * Status: resolved