• Resolved TheArcturian

    (@thearcturian)


    I get these fatal errors in the PHP log:

    [02-Feb-2023 17:51:48 UTC] PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 73728 bytes) in /www/wp-includes/class-wpdb.php on line 2187
    [02-Feb-2023 17:51:48 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT option_value FROM wp_options WHERE option_name = 'jpsq_sync_checkout' made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\Jetpack\Sync\Sender->do_sync, Automattic\Jetpack\Sync\Dedicated_Sender::spawn_sync, Automattic\Jetpack\Sync\Queue->is_locked, Automattic\Jetpack\Sync\Queue->get_checkout_id
    [02-Feb-2023 17:51:48 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT count(*) FROM wp_options WHERE option_name LIKE 'jpsq_sync-%' made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\Jetpack\Sync\Sender->do_sync, Automattic\Jetpack\Sync\Dedicated_Sender::spawn_sync, Automattic\Jetpack\Sync\Queue->size
    [02-Feb-2023 17:51:48 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT option_value FROM wp_options WHERE option_name = 'jetpack_sync_full_status' LIMIT 1 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\Jetpack\Sync\Sender->do_full_sync, Automattic\Jetpack\Sync\Modules\Full_Sync_Immediately->get_status, Jetpack_Options::get_raw_option
    

    The memory limit for PHP is already 512M. According to this thread, it is because of the following:

    It looks like your?'posts_per_page' => 1000?query puts 1000 posts’ worth of meta- and term- data into the cache, thereby blowing out your web host machine’s RAM.

    https://stackoverflow.com/questions/75246805/wp-query-after-wp-update-fatal-error-allowed-memory-size-of-536870912-bytes

    Is this something you can fix?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support lastsplash (a11n)

    (@lastsplash)

    Hi @thearcturian

    Are you able to increase the memory limit on your site? It looks like it is being exceeded, which could be due to other things running on your server. More memory may allow this operation to succeed.

    Additionally, could you please post your site URL here so that we can have a look?

    If you want it to remain private, you can also contact us via this contact form. If you choose to reach out directly, please include a link to this thread.

    Thanks!

    Thread Starter TheArcturian

    (@thearcturian)

    Yes, the memory limit is already set to maximum on my host which is 512MB. That should be plenty so something must be wrong.

    You can take a look at this url which is one of a few posts that ALWAYS creates the fatal error:

    https://www.nyhetsspeilet.no/2011/12/thrive-the-movie/

    I have activated DEBUG (will be turned off again though) and this is what you will see:

    
    WordPress database error: [Commands out of sync; you can't run this command now]
    SELECT option_value FROM wp_options WHERE option_name = 'jpsq_sync_checkout'
    
    WordPress database error: [Commands out of sync; you can't run this command now]
    SELECT count(*) FROM wp_options WHERE option_name LIKE 'jpsq_sync-%'
    
    WordPress database error: [Commands out of sync; you can't run this command now]
    SELECT option_value FROM wp_options WHERE option_name = 'jetpack_sync_full_status' LIMIT 1
    
    
    
    
    Thread Starter TheArcturian

    (@thearcturian)

    The fatal error sometimes shows up on the front page, the category pages and any other random page. Especially after creating the cache again in WP Rocket.

    Seems like the cached page creates some kind of “out of sync” fatal crash.

    We are running PHP 8.2. The error crashes random pages for our readers so it is quite critical to fix it.

    Thread Starter TheArcturian

    (@thearcturian)

    I hope to hear from you guys soon. Just one quick question; What module of Jetpack is doing the 3 queries that crashes the rendering?

    Plugin Support Bruce (a11n)

    (@bruceallen)

    Happiness Engineer

    Hi @thearcturian

    The error you saw may occur when the MySQL data is left in an inconsistent state – and that may be due to another plugin running a query and never fully completing / clearing it. This would cause the errors with the sync modules are being shown.

    As a first step, could you please try disabling any caching or security plugins on your site and installing Jetpack again to see if that makes any difference?

    Plugin Contributor Stef (a11n)

    (@erania-pinnera)

    Hi there, @thearcturian,

    It’s been one week since this topic was last updated. I’m going to mark this thread as solved. If you have any further questions or need more help, you’re welcome to open another thread here. Cheers!

    Thread Starter TheArcturian

    (@thearcturian)

    Well, it is not solved yet. We have 30 authors and one of them is causing a fatal error on the website when showing that users profile or showing that users posts.?I?have disabled ALL plugins and still have the fatal error.

    Really strange. Might be a rare issue with the theme. Anyways, Jetpack doesn’t seem to be the root cause in this case.

    Thread Starter TheArcturian

    (@thearcturian)

    You can close the ticket!

    I found the root cause. It was one post from a spesific author?that had over 23.000 records of data from wp_postmeta for some reason?which obviously led to a fatal error.

    Plugin Support lastsplash (a11n)

    (@lastsplash)

    Thanks for letting us know that you solved the issue.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘PHP Fatal error because of Automattic\Jetpack\Sync\Sender->do_sync’ is closed to new replies.