• Resolved workingbee312

    (@workingbee312)


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

    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

    Always an actionscheduler_actions error.
    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 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @workingbee312,

    The issue you’re experiencing could be related to the size of your site and the number of products you have. The Action Scheduler is a background processing library used by WooCommerce and other plugins to schedule events. When your site has a large number of products, the Action Scheduler might require more memory to process these events.

    However, the memory limit you’ve set in your wp-config and PHP.ini files should be more than sufficient. The error message suggests that the system is trying to allocate around 4GB of memory, which is less than the limit you’ve set. This suggests that the issue might not be with the memory limit settings.

    The problem could be due to the server not being able to allocate the memory. It’s possible that there’s not enough physical or virtual memory available on the server. This could be a limitation of your hosting service.

    Another possibility is a conflict with one of your plugins. Try deactivating your plugins one by one to see if the issue persists. If the issue resolves after deactivating a specific plugin, then that plugin is likely the cause of the problem. You can find a more detailed explanation of conducting a conflict test here.

    Let us know how that goes. Looking forward to helping you.

    Thread Starter workingbee312

    (@workingbee312)

    Hello, Shameem and thank you for your reply.
    My server has the available physical and virtual memory.
    Actually, it doesn’t even use all the allocated memory.
    I’ve troubleshooted plugins before, but the issue persists.
    Do you have any idea how I can tweak my server settings to be able to allocate the memory?

    Thank you.

    Hi there @workingbee312 ??

    To get an idea of how your site is configured, could you please share a copy of your site’s System Status, as exemplified here? Once you have the System Status Report, please paste it with your reply here, or share it via?Mozilla Community Pastebin?and share the link here.

    Looking forward to hearing from you!

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @workingbee312,

    Since your server has sufficient physical and virtual memory and you’ve already troubleshooted the plugins, the issue might be related to how your server is allocating memory.

    Though I have limited knowledge and expertise in server configuration, however, here are a few server settings you can tweak:

    1. Increase your server’s memory limit: Even though your PHP settings allow a high memory limit, your server might have its own limitations. You can usually increase this limit in your server’s main configuration file or through your hosting control panel.
    2. Adjust PHP-FPM settings: If you’re using PHP-FPM, try increasing the pm.max_children value. This setting controls the maximum number of child processes that can be created. Increasing this limit can help if your site is trying to handle many requests at once.
    3. Optimize your database: Regularly optimizing it can help improve its performance and reduce memory usage. You can use a plugin like WP-Optimize for this. Also, if possible, think about switching to HPOS too.
    4. Enable object caching: Object caching can help reduce the number of database calls your site makes, which can help save memory.

    If you’re uncomfortable making these changes yourself, I recommend contacting your hosting provider. They should be able to help you adjust these settings or provide other recommendations based on your specific server configuration.

    I hope this provides some clarity. Please let us know if you have any other questions!

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