• Resolved Ted Slater

    (@tedslater)


    My website has about 180,000 posts. Apparently the way the plugin is configured, it regularly parses through all 180,000 posts, which causes sluggishness and instability. I think. Honestly, I’m not certain.

    I shared some lines from my slow log file with ChatGPT, and this was its response:

    The Post Expirator plugin is invoking WooCommerce Action Scheduler … and Action Scheduler is literally calling sleep() inside an admin-ajax request.

    sleep() /wp-content/plugins/post-expirator/lib/vendor/woocommerce/action-scheduler/classes/ActionScheduler_AsyncRequest_QueueRunner.php:53

    That means:

    • Every time WordPress triggers certain async tasks (expiring posts, cleaning batches, etc.),
    • Action Scheduler fires an admin-ajax request,
    • And that request blocks a PHP-FPM worker for however long it sleeps.

    On a large site—millions of pageviews and constant cron events—this is disastrous. You get:

    • Stalled PHP-FPM workers
    • Admin pages that sit and spin
    • A backed-up action queue
    • Slow or entirely hung /wp-admin operations

    Action Scheduler is fine on medium sites.
    On massive sites, coupled with Post Expirator and hundreds of queued tasks, it can rail your server.

    And since Post Expirator bundles its own copy of WooCommerce’s Action Scheduler, you get duplicate schedulers, duplicate task queues, and needless worker duplication.

    Diagnosis: Action Scheduler + Post Expirator async queue is clogging PHP-FPM with sleeping workers.

    I am not using WooCommerce on my website.

    Thoughts on how to address this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Riza Prihananto

    (@rizaprihananto)

    Hi @tedslater ,

    Thank you for using PublishPress.
    To confirm the issue we need to do more investigation. Could you provide us with the log you shared with ChatGPT?

    Thread Starter Ted Slater

    (@tedslater)

    Sure will! Here you go:

    [02-Dec-2025 10:51:11] [pool websitename] pid 2879917
    script_filename = /home/websitename/www/wp-admin/admin-ajax.php
    [0x00007f76c92143e0] sleep() /home/websitename/www/wp-content/plugins/post-expirator/lib/vendor/woocommerce/action-scheduler/classes/ActionScheduler_AsyncRequest_QueueRunner.php:53
    [0x00007f76c9214370] handle() /home/websitename/www/wp-content/plugins/post-expirator/lib/vendor/woocommerce/action-scheduler/lib/WP_Async_Request.php:174
    [0x00007f76c9214300] maybe_handle() /home/websitename/www/wp-includes/class-wp-hook.php:324
    [0x00007f76c9214220] apply_filters() /home/websitename/www/wp-includes/class-wp-hook.php:348
    [0x00007f76c92141b0] do_action() /home/websitename/www/wp-includes/plugin.php:517
    [0x00007f76c92140d0] do_action() /home/websitename/www/wp-admin/admin-ajax.php:192

    [02-Dec-2025 10:51:36] [pool websitename] pid 2879917
    script_filename = /home/websitename/www/index.php
    [0x00007f76c9214dd0] mysqli_query() /home/websitename/www/wp-includes/class-wpdb.php:2351
    [0x00007f76c9214d60] _do_query() /home/websitename/www/wp-includes/class-wpdb.php:2265
    [0x00007f76c9214c80] query() /home/websitename/www/wp-includes/class-wpdb.php:3107
    [0x00007f76c9214bd0] get_col() /home/websitename/www/wp-includes/class-wp-query.php:3419
    [0x00007f76c9214310] get_posts() /home/websitename/www/wp-includes/class-wp-query.php:3949
    [0x00007f76c92142a0] query() /home/websitename/www/wp-includes/class-wp.php:701
    [0x00007f76c9214230] query_posts() /home/websitename/www/wp-includes/class-wp.php:821
    [0x00007f76c92141a0] main() /home/websitename/www/wp-includes/functions.php:1342
    [0x00007f76c9214100] wp() /home/websitename/www/wp-blog-header.php:16
    [0x00007f76c9214070] [INCLUDE_OR_EVAL]() /home/websitename/www/index.php:17

    Thanks, Riza!

    • This reply was modified 6 months ago by Ted Slater.
    Plugin Support Riza Prihananto

    (@rizaprihananto)

    Hi @tedslater ,

    Thank you for providing the logs.
    We are currently investigating it, but it might take some time until we have a more solid fix for this.

    Could you try to try disabling the async request runner by adding the following code snippet  to functions.php, custom plugin or similar.

    add_filter( 'action_scheduler_allow_async_request_runner', '__return_false' );

    Then set up a cron job on his host server to run:

    wp action-scheduler action run $( wp action-scheduler action list --status=pending --group=action-scheduler --format=ids )

    We also created an issue for monitoring the investigation process here: https://github.com/publishpress/publishpress-future/issues/1523

    Feel free to take a look to find out the progress and let us know if you have another concern regarding this issue.

    Plugin Support Riza Prihananto

    (@rizaprihananto)

    Hi @tedslater ,

    Thank you for using PublishPress.

    We haven’t heard back from you in a week. Let me mark this issue as resolved. If you would like to continue the discussion, you can reply this message or create a new one.

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

You must be logged in to reply to this topic.