• Resolved andreholman

    (@andreholman)


    HI there,

    Since a while we using HPOS and thats works fine, the plugins we using are comppatible and have been test in a staging server.

    Now since a few days it takes ages to open a orders and getting the next fatal error.

    2024-05-06T08:55:50+00:00Kritiek Allowed memory size of 2147483648 bytes exhausted (tried to allocate 20480 bytes) Aanvullende context{ “error”: { “type”: 1, “file”: “\/var\/www\/vhosts\/domain.com\/httpdocs\/wp-includes\/functions.php”, “line”: 650 }, “backtrace”: [ { “file”: “\/var\/www\/vhosts\/domain.com\/httpdocs\/wp-content\/plugins\/woocommerce\/includes\/class-woocommerce.php”, “line”: 377, “function”: “critical”, “class”: “WC_Logger”, “type”: “->” }, { “function”: “log_errors”, “class”: “WooCommerce”, “type”: “->” } ] }

    If i go to functions in the includer folder i see the next on line 650

    return @unserialize( trim( $data ) );

    I set the memory limit to 2048mb and then still getting this error.

    Can anyone help me in the direction to fix this?

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Stef

    (@serafinnyc)

    This has nothing to do with that file or folder. You are running out of resources by trying to run a task. For instance if you’re trying to import something or upload something. Your server can’t handle the request.

    You need to check your servers resources and then you also need to try and up the memory to something like 512. However, it’ll be whatever the max allotted memory is for your instance.

    Add this to you config file to see if this helps first. define(‘WP_MEMORY_LIMIT’, ‘256M’);

    Thread Starter andreholman

    (@andreholman)

    Sorry for the bad explanation. It is more of a problem that it takes a very long time before an order opens on the order page. Above is a screenshot of the query loading time.
    It is disabled with all plugins, so only with the woocommerce plugin active.

    Also with the orders synchronized and HPOS active

    Stef

    (@serafinnyc)

    You still need me memory. You probably have too much data on the postmeta table and it can’t process the orders.

    There are several hooks you can do like controlling the heartbeat and removing the order count (red dot). However, that doesn’t help the fact you still need more memory.

    Thread Starter andreholman

    (@andreholman)

    We have _postmeta?Data: 2074.84MB in use and i set the memory to 2gb and the server can handle 8gbRAM. I think this is good enough?

    Stef

    (@serafinnyc)

    You set the memory where? Are you using cPanel or something else or you added what I posted above to your config? Memory will only be whatever your hosts dictates it can be. Like max and so on.

    That being said, that table is huge and needs to be indexed. I’d suggest adding an app called Index WP MySQL For Speed you can check it out here. I’d make a backup first and it’s best if you use CLI for this since your DB is a bit large there. Manually the server won’t be able to run this. Read all their docs first and then proceed on maybe a Staging environment first and see how it goes before proceeding on a live enviro

    Thread Starter andreholman

    (@andreholman)

    Thanks for the reply.

    The server can handle this memory and we are using a 4?vCPUs
    8GB / 100GB Disk on DO and only with this shop running on it.

    I check the option CLI and the app for MSQL speed

    Maby i also think i found a problem thats takes ages to load postmeta. When i log into de database i see the postmeta includes 302000 pages times 25 rows and not all pages are fill with data.

    Stef

    (@serafinnyc)

    That’s not enough to run that DB, believe me. I dealt with a site that was the same and it slowed down to a snail’s pace. You have half the allocated resources needed to run this puppy.

    Your postmeta find, it goes deeper than that. Like a rabbit hole. You need more resources.

    Hi ?? We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Open orders takes many seconds and getting error’ is closed to new replies.