• My website is big ~ 700,000 WooCommerce products.
    I have changed my wp-config:

    <?php
    
    define( 'WP_MEMORY_LIMIT', '54800M' );
    define( 'WP_MAX_MEMORY_LIMIT', '54800M');

    PHP.ini is set to memory_limit=52800M

    and I still get memory errors when running most of the actions of my plugins:

    [25-Dec-2023 01:13:42 UTC] WordPress database error Out of memory (Needed 4294967256 bytes) for query SELECT COUNT(DISTINCT claim_id) FROM wpyd_actionscheduler_actions WHERE claim_id != 0 AND status IN ( 'pending', 'in-progress') made by do_action('wp_ajax_as_async_request_queue_runner'), WP_Hook->do_action, WP_Hook->apply_filters, WP_Async_Request->maybe_handle, ActionScheduler_AsyncRequest_QueueRunner->handle, do_action('action_scheduler_run_queue'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->run, ActionScheduler_Abstract_QueueRunner->has_maximum_concurrent_batches, ActionScheduler_DBStore->get_claim_count
    [25-Dec-2023 01:15:46 UTC] WordPress database error Out of memory (Needed 4294967256 bytes) for query SELECT COUNT(DISTINCT claim_id) FROM wpyd_actionscheduler_actions WHERE claim_id != 0 AND status IN ( 'pending', 'in-progress') made by do_action('wp_ajax_as_async_request_queue_runner'), WP_Hook->do_action, WP_Hook->apply_filters, WP_Async_Request->maybe_handle, ActionScheduler_AsyncRequest_QueueRunner->handle, ActionScheduler_AsyncRequest_QueueRunner->maybe_dispatch, ActionScheduler_AsyncRequest_QueueRunner->allow, ActionScheduler_Abstract_QueueRunner->has_maximum_concurrent_batches, ActionScheduler_DBStore->get_claim_count

    This is my startup log:

    2023-12-25  2:58:30 0 [Note] Starting MariaDB 10.4.28-MariaDB source revision c8f2e9a5c0ac5905f28b050b7df5a9ffd914b7e7 as process 26772
    2023-12-25  2:58:30 0 [Warning] option 'innodb-log-buffer-size': unsigned value 46976204800 adjusted to 2147482624
    2023-12-25  2:58:30 0 [Warning] option 'innodb-buffer-pool-chunk-size': unsigned value 5368709120 adjusted to 2146435072
    2023-12-25  2:58:30 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
    2023-12-25  2:58:30 0 [Note] InnoDB: Uses event mutexes
    2023-12-25  2:58:30 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
    2023-12-25  2:58:30 0 [Note] InnoDB: Number of pools: 1
    2023-12-25  2:58:30 0 [Note] InnoDB: Using SSE2 crc32 instructions
    2023-12-25  2:58:30 0 [Note] InnoDB: Initializing buffer pool, total size = 39.9805G, instances = 10, chunk size = 1.99902G
    2023-12-25  2:58:30 0 [Note] InnoDB: Completed initialization of buffer pool
    2023-12-25  2:58:30 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=3512903108821
    2023-12-25  2:58:30 0 [Note] InnoDB: Starting final batch to recover 3 pages from redo log.
    2023-12-25  2:58:31 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
    2023-12-25  2:58:31 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
    2023-12-25  2:58:31 0 [Note] InnoDB: Creating shared tablespace for temporary tables
    2023-12-25  2:58:31 0 [Note] InnoDB: Setting file 'D:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
    2023-12-25  2:58:31 0 [Note] InnoDB: File 'D:\xampp\mysql\data\ibtmp1' size is now 12 MB.
    2023-12-25  2:58:31 0 [Note] InnoDB: Waiting for purge to start
    2023-12-25  2:58:31 0 [Note] InnoDB: 10.4.28 started; log sequence number 3512903108870; transaction id 654344011
    2023-12-25  2:58:31 0 [Note] InnoDB: Loading buffer pool(s) from D:\xampp\mysql\data\ib_buffer_pool
    2023-12-25  2:58:31 0 [Note] Plugin 'FEEDBACK' is disabled.
    2023-12-25  2:58:31 0 [Note] Server socket created on IP: '::'.

    I have set up the two warnings in my.ini, but they keep showing up if that has anything to do with the errors:

    2023-12-25  2:58:30 0 [Warning] option 'innodb-log-buffer-size': unsigned value 46976204800 adjusted to 2147482624
    2023-12-25  2:58:30 0 [Warning] option 'innodb-buffer-pool-chunk-size': unsigned value 5368709120 adjusted to 2146435072
    
    They are set to:
    innodb_log_buffer_size=44800M
    innodb_buffer_pool_chunk_size=3.99805G

    Another instance of errors that break my website when running a plugin:

    [25-Dec-2023 01:28:13 UTC] PHP Warning:  Trying to access array offset on value of type int in D:\xampp\htdocs\wp-includes\formatting.php on line 889
    
    [25-Dec-2023 01:29:47 UTC] WordPress database error Out of memory (Needed 4294967256 bytes) for query SELECT COUNT(DISTINCT claim_id) FROM wpyd_actionscheduler_actions WHERE claim_id != 0 AND status IN ( 'pending', 'in-progress') made by do_action('wp_ajax_as_async_request_queue_runner'), WP_Hook->do_action, WP_Hook->apply_filters, WP_Async_Request->maybe_handle, ActionScheduler_AsyncRequest_QueueRunner->handle, do_action('action_scheduler_run_queue'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->run, ActionScheduler_Abstract_QueueRunner->has_maximum_concurrent_batches, ActionScheduler_DBStore->get_claim_count
    
    [25-Dec-2023 01:29:59 UTC] PHP Warning:  Attempt to read property "object_type" on bool in D:\xampp\htdocs\wp-includes\taxonomy.php on line 3540
    
    [25-Dec-2023 01:29:59 UTC] PHP Warning:  Attempt to read property "object_type" on bool in D:\xampp\htdocs\wp-includes\taxonomy.php on line 4102
    
    [25-Dec-2023 01:29:59 UTC] PHP Warning:  Attempt to read property "name" on bool in D:\xampp\htdocs\wp-includes\taxonomy.php on line 4147
    
    [25-Dec-2023 01:29:59 UTC] PHP Warning:  Attempt to read property "name" on bool in D:\xampp\htdocs\wp-includes\taxonomy.php on line 4151

    What could cause the memory issue and query errors ?
    I’ve been trying to fix this for a week, but I can’t, so please help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator James Huff

    (@macmanx)

    Needed 4294967256 bytes

    That’s 4.29 gigabytes, which is quote a lot. Something else might be at play here. Do you have the same problem with WooCommerce as your only active plugin?

    If so, I recommend getting in touch with WooCommerce’s support about this via https://woo.com/my-account/contact-support/ if you have any of their paid WooCommerce products or https://www.ads-software.com/support/plugin/woocommerce/ if you do not.

    define( ‘WP_MEMORY_LIMIT’, ‘54800M’ );

    That’s 54.8 gigabytes. Are you sure you even have that physically available to your hosting account? It’s possible to hit out-of-memory errors by either needing more memory than allocated or requesting more memory than available.

    Thread Starter workingbee312

    (@workingbee312)

    Hello.

    Yes, I have 64GB.
    The issue is not related to WooCommerce only. Other plugins cause the same issue as mentioned above (Yoast for example).
    I’ve tried disabling most of my plugins and the result is the same.
    My best guess so far is server misconfiguration, but I have tried everything possible without a result.
    Do you have any idea how I can increase the availability of the required 4.29G to do a query, so that my website can be up and running again ?

    *The server doesn’t even utilize all the allocated memory. It only uses less than half of it and I still get this error.

    Thank you.

    Moderator James Huff

    (@macmanx)

    In your Dashboard, at Tools > Site Health > Info > Server, what does it say for “PHP memory limit”?

    Thread Starter workingbee312

    (@workingbee312)

    PHP post max size9999M

    PHP max input variables9000000

    PHP post max size9999M

    PHP memory limit-1

    (I changed it to -1 yesterday hoping that no limit will help, but it didn’t)

    Moderator James Huff

    (@macmanx)

    Hm, and I assume it displays correctly if you set it back to 54800M?

    Thread Starter workingbee312

    (@workingbee312)

    Yes, it works fine.
    I am completely stuck with this. 0 ideas.

    Moderator James Huff

    (@macmanx)

    Ok, if WordPress is aware that it has access to more memory than needed, and yet the server is still returning out of memory errors, then that does point to a server misconfiguration, possibly that the memory has not been properly made available and that WordPress by way of PHP is requesting more memory than is possible (as far as the server knows).

    At this point, I recommend either getting in touch with WooCommerce’s support to optimize the queries via?https://woo.com/my-account/contact-support/?if you have any of their paid WooCommerce products or?https://www.ads-software.com/support/plugin/woocommerce/?if you do not.

    Or, reaching out to support for your server platform to see what could be misconfigured regarding memory allocation.

    Thread Starter workingbee312

    (@workingbee312)

    Thank you, James. I will.
    Meanwhile if anyone has any ideas – that would be great.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Database out of memory error – but enough is defined’ is closed to new replies.